services: postgres: image: postgres:15-alpine restart: unless-stopped networks: - default environment: POSTGRES_USER: clawith POSTGRES_PASSWORD: clawith POSTGRES_DB: clawith volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U clawith" ] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped networks: - default volumes: - redisdata:/data healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 5s timeout: 5s retries: 5 backend: image: clawith-backend:${IMAGE_TAG:-local} build: context: ./backend args: CLAWITH_PIP_INDEX_URL: ${CLAWITH_PIP_INDEX_URL:-} CLAWITH_PIP_TRUSTED_HOST: ${CLAWITH_PIP_TRUSTED_HOST:-} restart: unless-stopped command: ["/bin/bash", "/app/entrypoint.sh"] environment: DATABASE_URL: postgresql+asyncpg://clawith:clawith@postgres:5432/clawith REDIS_URL: redis://redis:6379/0 AGENT_DATA_DIR: /data/agents AGENT_TEMPLATE_DIR: /app/agent_template STORAGE_BACKEND: ${STORAGE_BACKEND:-local} STORAGE_LOCAL_ROOT: /data/agents DOCKER_NETWORK: ${CLAWITH_DOCKER_NETWORK:-clawith_network} SECRET_KEY: ${SECRET_KEY:-change-me-in-production} JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me-jwt-secret} PROCESS_ROLE: all AGENT_RUNTIME_COMMAND_CONCURRENCY: ${AGENT_RUNTIME_COMMAND_CONCURRENCY:-10} AGENT_RUNTIME_V2_ENABLED: "true" AGENT_RUNTIME_V2_AGENT_IDS: "" AGENT_RUNTIME_V2_SOURCE_TYPES: "" SANDBOX_DEFAULT_TIMEOUT: ${SANDBOX_DEFAULT_TIMEOUT:-180} SANDBOX_MAX_TIMEOUT: ${SANDBOX_MAX_TIMEOUT:-300} CORS_ORIGINS: '["*"]' FEISHU_APP_ID: ${FEISHU_APP_ID:-} FEISHU_APP_SECRET: ${FEISHU_APP_SECRET:-} SS_CONFIG_FILE: /data/ss-nodes.json # Public base URL for constructing OAuth callback URLs and email links. # Required when deployed behind a reverse proxy (e.g. Nginx, Cloudflare). # If not set, the server infers the URL from the incoming request host. PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-} # Platform-scoped models used by native Group planning and threshold-only # shared Session Context compaction. MULTI_AGENT_PLANNING_MODEL_ID: ${MULTI_AGENT_PLANNING_MODEL_ID:-} MULTI_AGENT_COMPACT_MODEL_ID: ${MULTI_AGENT_COMPACT_MODEL_ID:-} # Password reset token lifetime in minutes (default: 30) PASSWORD_RESET_TOKEN_EXPIRE_MINUTES: ${PASSWORD_RESET_TOKEN_EXPIRE_MINUTES:-30} volumes: - ./backend/agent_data:/data/agents - /var/run/docker.sock:/var/run/docker.sock - ./ss-nodes.json:/data/ss-nodes.json:ro privileged: true cap_add: - SYS_ADMIN security_opt: - seccomp=unconfined - apparmor=unconfined networks: - default depends_on: postgres: condition: service_healthy redis: condition: service_healthy logging: driver: json-file options: max-size: "10m" max-file: "3" desktop-automation: image: clawith-desktop-automation:${IMAGE_TAG:-local} build: context: . dockerfile: deploy/desktop-automation/Dockerfile args: BASE_IMAGE: backend-base additional_contexts: backend-base: service:backend restart: unless-stopped init: true env_file: - ${AUTOMATION_ENV_FILE:-./desktop-automation.env} environment: DATABASE_URL: postgresql+asyncpg://clawith:clawith@postgres:5432/clawith REDIS_URL: redis://redis:6379/0 SECRET_KEY: ${SECRET_KEY:-change-me-in-production} JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me-jwt-secret} AUTOMATION_MCP_URL: http://clawith-desktop-automation:8080/api/automation-mcp AUTOMATION_DRIVER_TOKEN_FILE: /run/automation/driver-token AUTOMATION_SIGNING_KEY_FILE: /run/automation/signing-key AUTOMATION_SANDBOX_TOKEN_FILE: /run/automation/sandbox-token AUTOMATION_EVIDENCE_DIR: /data/desktop-automation volumes: - type: bind source: ${AUTOMATION_SECRETS_DIR:-./secrets/desktop-automation} target: /run/automation read_only: true bind: create_host_path: false - automation-evidence:/data/desktop-automation ports: - "127.0.0.1:${AUTOMATION_PORT:-18128}:8080" cpus: 1.5 mem_limit: 1g pids_limit: 256 cap_drop: [ALL] security_opt: [no-new-privileges:true] networks: default: aliases: [clawith-desktop-automation] depends_on: backend: condition: service_healthy frontend: build: ./frontend restart: unless-stopped ports: - "${FRONTEND_PORT:-3008}:3000" environment: VITE_API_URL: http://localhost:8000 API_UPSTREAM: ${API_UPSTREAM:-backend:8000} MINIO_UPSTREAM: ${MINIO_UPSTREAM:-minio:9000} volumes: - ./frontend/nginx.conf.template:/etc/nginx/templates/default.conf.template:ro networks: - default depends_on: backend: condition: service_healthy desktop-automation: condition: service_healthy volumes: pgdata: redisdata: automation-evidence: networks: default: name: ${CLAWITH_DOCKER_NETWORK:-clawith_network}