SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
docker compose imag
Ahmed Essamcd50ef4b11d7
diff --git a/.env.example b/.env.exampleindex 6ec9c498..a8dba8ae 100644--- a/.env.example+++ b/.env.example@@ -3,7 +3,6 @@ NODE_ENV="development"DATABASE_PROVIDER=mysqlDATABASE_HOST=localhost-# Database username. any string is allowed except "root" since it is reserved for root user.DATABASE_USER=smythos_userDATABASE_PASSWORD=samplepassword111DATABASE_NAME=smythos-local@@ -11,10 +10,10 @@ DATABASE_NAME=smythos-localDATABASE_URL="$DATABASE_PROVIDER://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST:3306/$DATABASE_NAME?allowPublicKeyRetrieval=true&useSSL=false"-DEFAULT_AGENT_DOMAIN="localagent.stage.smyth.ai" # staging agents domain-PROD_AGENT_DOMAIN="localagent.stage.smyth.ai" # deployed / prod agent domain-APP_DOMAIN="http://localhost:5050"-RUNTIME_DOMAIN="http://localhost:5053"+APP_DOMAIN="localhost"+RUNTIME_DOMAIN="runtime.localhost"+DEFAULT_AGENT_DOMAIN="default.localhost"+PROD_AGENT_DOMAIN="prod.localhost"MIDDLEWARE_API_PORT="5000"APP_DEV_SERVER_PORT="4001"RUNTIME_PORT="5053"@@ -22,7 +21,10 @@ APP_PORT="5050"OPENAI_API_KEY="openai-api-key"-# enable this to use redis-# REDIS_HOST=redis-# REDIS_PORT=6379-# REDIS_PASSWORD=redis_password\ No newline at end of file+REDIS_HOST=redis+REDIS_PORT=6379+REDIS_PASSWORD=redis_password+++EXPOSE_TRAEFIK_PORT="80"+EXPOSE_HTTPS_TRAEFIK_PORT="443"\ No newline at end of filediff --git a/.env.full.example b/.env.full.exampleindex 3f16b197..34230982 100644--- a/.env.full.example+++ b/.env.full.example@@ -2,10 +2,11 @@# Environment Variables for SmythOS services# -------------------------------# domain for UI server-# example: http://localhost:4000+# domain for UI server (used by Traefik reverse proxy)+# example: app.yourdomain.com or localhost (for local development)+# if empty, defaults to localhost and routes to port 5050APP_DOMAIN=-# port for UI server+# port for UI server (internal port, proxied by Traefik)APP_PORT=# vite dev server (react hot reload)# example: 4001@@ -58,20 +59,33 @@ AWS_S3_PUB_BUCKET_NAME=MAINTENANCE=-# Runtime server port+# Runtime server port (internal port, proxied by Traefik)RUNTIME_PORT=# Runtime admin port for admin operations (e.g. stopping server, requests, halt etc)RUNTIME_ADMIN_PORT=-# Runtime domain-# default to http://localhost:${RUNTIME_PORT}++# === Traefik Reverse Proxy Domain Configuration ===+# These domains are used by Traefik to route requests to the appropriate services+# All domains below route to the runtime server (port 5053) via Traefik reverse proxy++# Runtime domain (used by Traefik reverse proxy)+# example: runtime.yourdomain.com or runtime.localhost (for local development)+# if empty, defaults to runtime.localhost and routes to port 5053RUNTIME_DOMAIN=# domain that hosts development agents. aka the agent state that is visible in canvas (see https://smythos.com/docs/agent-deployments/overview/)+# example: dev.yourdomain.com or default.localhost (for local development)+# if empty, defaults to default.localhost and routes to port 5053DEFAULT_AGENT_DOMAIN=+# port of DEFAULT_AGENT_DOMAIN# default to 80 or 443 depending on if the domain is secured using tls or not+# Note: When using Traefik, this is handled automatically (80 for HTTP, 443 for HTTPS)AGENT_DOMAIN_PORT=-# domain that hosts DEPLOYED / producation agents (see https://smythos.com/docs/agent-deployments/overview/)++# domain that hosts DEPLOYED / production agents (see https://smythos.com/docs/agent-deployments/overview/)+# example: agents.yourdomain.com or prod.localhost (for local development)+# if empty, defaults to prod.localhost and routes to port 5053PROD_AGENT_DOMAIN=# request limit per minute for runtime server# default to 300diff --git a/docker-compose.yml b/docker-compose.ymlindex c15131a3..87c846c2 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -1,6 +1,51 @@version: '3.8'services:+ # Traefik Reverse Proxy+ traefik:+ image: traefik:v3.0+ container_name: smythos-traefik+ restart: unless-stopped+ command:+ # Enable Docker provider+ - --providers.docker=true+ - --providers.docker.exposedbydefault=false+ - --providers.docker.network=smythos-network+ # Configure entrypoints for HTTP and HTTPS+ - --entrypoints.web.address=:80+ - --entrypoints.websecure.address=:443+ # Enable API and dashboard (optional, can be disabled in production)+ - --api.dashboard=true+ - --api.insecure=true+ # Enable access logs (optional)+ - --accesslog=true+ # Configure Let's Encrypt for automatic SSL (optional)+ # Let's Encrypt configuration+ - "--certificatesresolvers.le.acme.email=${LETSENCRYPT_EMAIL:[email protected]}" # replace with your actual email+ - "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"+ - "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"+ # Global redirect from HTTP to HTTPS (optional)+ - "--entrypoints.web.http.redirections.entryPoint.to=websecure"+ - "--entrypoints.web.http.redirections.entryPoint.scheme=https"+ ports:+ - "${EXPOSE_TRAEFIK_PORT:-80}:80"+ - "${EXPOSE_HTTPS_TRAEFIK_PORT:-443}:443"+ # Traefik dashboard (optional, can be removed in production)+ - "${EXPOSE_TRAEFIK_DASHBOARD_PORT:-8080}:8080"+ # Optional: Direct access ports for testing without hosts file+ # - "5050:5050" # Uncomment to access UI directly+ # - "5053:5053" # Uncomment to access Runtime directly+ volumes:+ - /var/run/docker.sock:/var/run/docker.sock:ro+ - traefik_letsencrypt:/letsencrypt+ networks:+ - smythos-network+ labels:+ - traefik.enable=true+ # Dashboard configuration (optional)+ - traefik.http.routers.traefik.rule=Host(`traefik.localhost`)+ - traefik.http.routers.traefik.service=api@internal+# MySQL Databasemysql:image: mysql:8.0@@ -65,6 +110,9 @@ services:dockerfile: Dockerfilecontainer_name: smythos-apprestart: unless-stopped+ expose:+ - "5050"+ - "5053"ports:- "5050:5050"- "5053:5053"@@ -79,6 +127,51 @@ services:REDIS_PASSWORD: ${REDIS_PASSWORD:-}# Docker container flag to ensure proper host bindingDOCKER_CONTAINER: "true"+ labels:+ - traefik.enable=true++ # APP_DOMAIN routing to port 5050 (UI Server)+ - "traefik.http.routers.smythos-app.rule=Host(`${APP_DOMAIN:-localhost}`)"+ - "traefik.http.routers.smythos-app.entrypoints=web,websecure"+ - "traefik.http.routers.smythos-app.service=smythos-app"+ # - "traefik.http.routers.smythos-app.tls=true"+ - "traefik.http.routers.smythos-app.tls.certresolver=le"++ # Service definition+ - "traefik.http.services.smythos-app.loadbalancer.server.port=5050"++ # RUNTIME_DOMAIN routing to port 5053 (Runtime Server)+ # Only create routes if RUNTIME_DOMAIN is set+ - "traefik.http.routers.smythos-runtime.rule=Host(`${RUNTIME_DOMAIN:-runtime.localhost}`)"+ - "traefik.http.routers.smythos-runtime.entrypoints=web,websecure"+ - "traefik.http.routers.smythos-runtime.service=smythos-runtime"+ - "traefik.http.routers.smythos-runtime.tls=true"+ - "traefik.http.routers.smythos-runtime.tls.certresolver=le"+ - "traefik.http.services.smythos-runtime.loadbalancer.server.port=5053"++ # PROD_AGENT_DOMAIN routing to port 5053 (Production Agents)+ - "traefik.http.routers.smythos-prod-agents.rule=Host(`${PROD_AGENT_DOMAIN:-prod.localhost}`)"+ - "traefik.http.routers.smythos-prod-agents.entrypoints=web,websecure"+ - "traefik.http.routers.smythos-prod-agents.service=smythos-runtime"+ - "traefik.http.routers.smythos-prod-agents.tls=true"+ - "traefik.http.routers.smythos-prod-agents.tls.certresolver=le"++ # DEFAULT_AGENT_DOMAIN routing to port 5053 (Default/Development Agents)+ - "traefik.http.routers.smythos-default-agents.rule=Host(`${DEFAULT_AGENT_DOMAIN:-default.localhost}`)"+ - "traefik.http.routers.smythos-default-agents.entrypoints=web,websecure"+ - "traefik.http.routers.smythos-default-agents.service=smythos-runtime"+ - "traefik.http.routers.smythos-default-agents.tls=true"+ - "traefik.http.routers.smythos-default-agents.tls.certresolver=le"+++ - traefik.http.middlewares.smythos.headers.SSLRedirect=true+ - traefik.http.middlewares.smythos.headers.STSSeconds=315360000+ - traefik.http.middlewares.smythos.headers.SSLHost=${APP_DOMAIN:-localhost}+ - traefik.http.middlewares.smythos.headers.STSPreload=true+ - traefik.http.middlewares.smythos.headers.browserXSSFilter=true+ - traefik.http.middlewares.smythos.headers.contentTypeNosniff=true+ - traefik.http.middlewares.smythos.headers.forceSTSHeader=true+ - traefik.http.middlewares.smythos.headers.STSIncludeSubdomains=truevolumes:- smythos_data:/root/smythos-data@@ -89,6 +182,8 @@ services:condition: service_healthyredis:condition: service_healthy+ traefik:+ condition: service_startedhealthcheck:test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:5050/health && wget --no-verbose --tries=1 --spider http://localhost:5053/health"]interval: 30s@@ -108,4 +203,6 @@ volumes:driver: localsmythos_data:driver: local+ traefik_letsencrypt:+ driver: local