name: agentbox services: postgres: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-agentbox} POSTGRES_USER: ${POSTGRES_USER:-agentbox} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-before-deploy} volumes: - agentbox-postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", 'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"'] interval: 5s timeout: 5s retries: 12 logging: driver: json-file options: max-size: "10m" max-file: "3" server: # Session tickets and Worker/browser WebSockets are process-local. # Keep exactly one Server replica; overlapping rolling updates are unsupported. image: ghcr.io/7-e1even/agentbox-server:${AGENTBOX_VERSION:-latest} build: context: ./server args: GOPROXY: ${GOPROXY:-https://proxy.golang.org,direct} VERSION: ${AGENTBOX_VERSION:-dev} restart: unless-stopped environment: DATABASE_URL: postgresql://${POSTGRES_USER:-agentbox}:${POSTGRES_PASSWORD:-change-me-before-deploy}@postgres:5432/${POSTGRES_DB:-agentbox}?sslmode=disable PORT: "8091" AGENTBOX_BIND_HOST: 0.0.0.0 ALLOWED_ORIGINS: "${AGENTBOX_ALLOWED_ORIGINS:-}" AGENTBOX_SETUP_CODE: "${AGENTBOX_SETUP_CODE:-}" AGENTBOX_SECRET_KEY_FILE: /var/lib/agentbox/secret-key AGENTBOX_WORKER_BINARY_DIR: /usr/local/lib/agentbox/workers AGENTBOX_ALLOW_PRIVATE_PROVIDER_ENDPOINTS: ${AGENTBOX_ALLOW_PRIVATE_PROVIDER_ENDPOINTS:-false} AGENTBOX_TRUSTED_PROXY: ${AGENTBOX_TRUSTED_PROXY:-false} AGENTBOX_TRUSTED_PROXY_CIDRS: "${AGENTBOX_TRUSTED_PROXY_CIDRS:-}" AGENTBOX_ENV: production AGENTBOX_DISABLE_AUTH: "false" volumes: - agentbox-secrets:/var/lib/agentbox depends_on: postgres: condition: service_healthy healthcheck: test: [ "CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8091/healthz", ] interval: 5s timeout: 5s retries: 12 logging: driver: json-file options: max-size: "10m" max-file: "3" app: image: ghcr.io/7-e1even/agentbox-app:${AGENTBOX_VERSION:-latest} build: context: ./app args: AGENTBOX_API_URL: http://server:8091 restart: unless-stopped environment: AGENTBOX_API_URL: http://server:8091 AGENTBOX_PUBLIC_URL: "${AGENTBOX_PUBLIC_URL:-}" HOSTNAME: 0.0.0.0 PORT: "3000" ports: - "${AGENTBOX_PORT:-3000}:3000" depends_on: server: condition: service_healthy healthcheck: test: [ "CMD", "node", "-e", "fetch('http://127.0.0.1:3000/api/auth/status').then(r=>{if(!r.ok)throw new Error(String(r.status))}).catch(()=>process.exit(1))", ] interval: 10s timeout: 5s retries: 12 logging: driver: json-file options: max-size: "10m" max-file: "3" volumes: agentbox-postgres: agentbox-secrets: