mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
## Summary - Replaces the arch-conditional chromium install (ARM64 vs AMD64) with a single approach: always use the distro-packaged `chromium` and set `AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium` - Removes `agent-browser install` entirely (it downloads Chrome for Testing, which has no ARM64 binary) - Removes the `entrypoint.sh` wrapper script that was setting the env var at runtime - Updates `autogpt_platform/db/docker/docker-compose.yml`: removes `external: true` from the network declarations so the Supabase stack can be brought up standalone (needed for the Docker integration tests in the test plan below — without this, `docker compose up` fails unless the platform stack is already running); also sets `GOTRUE_MAILER_AUTOCONFIRM: true` for local dev convenience (no SMTP setup required on first run — this compose file is not used in production) - Updates `autogpt_platform/docker-compose.platform.yml`: mounts the `workspace` volume so agent-browser results (screenshots, snapshots) are accessible from other services; without this the copilot workspace write fails in Docker ## Verification Tested via Docker build on arm64 (Apple Silicon): ``` === Testing agent-browser with system chromium === ✓ Example Domain https://example.com/ === SUCCESS: agent-browser launched with system chromium === ``` agent-browser navigated to example.com in ~1.5s using system chromium (v146 from Debian trixie). ## Test plan - [x] Docker build test on arm64: `agent-browser open https://example.com` succeeds with system chromium - [x] Verify amd64 Docker build still works (CI)
381 lines
9.8 KiB
YAML
381 lines
9.8 KiB
YAML
# Environment Variable Loading Order (first → last, later overrides earlier):
|
|
# 1. backend/.env.default - Default values for all settings
|
|
# 2. backend/.env - User's custom configuration (if exists)
|
|
# 3. environment key - Docker-specific overrides defined below
|
|
# 4. Shell environment - Variables exported before running docker compose
|
|
# 5. CLI arguments - docker compose run -e VAR=value
|
|
|
|
# Common backend environment - Docker service names
|
|
x-backend-env: &backend-env # Docker internal service hostnames (override localhost defaults)
|
|
PYRO_HOST: "0.0.0.0"
|
|
AGENTSERVER_HOST: rest_server
|
|
SCHEDULER_HOST: scheduler_server
|
|
DATABASEMANAGER_HOST: database_manager
|
|
EXECUTIONMANAGER_HOST: executor
|
|
NOTIFICATIONMANAGER_HOST: notification_server
|
|
CLAMAV_SERVICE_HOST: clamav
|
|
DB_HOST: db
|
|
REDIS_HOST: redis
|
|
RABBITMQ_HOST: rabbitmq
|
|
# Override Supabase URL for Docker network
|
|
SUPABASE_URL: http://kong:8000
|
|
# Database connection string for Docker network
|
|
# This cannot be constructed like in .env because we cannot interpolate values set here (DB_HOST)
|
|
DATABASE_URL: postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=platform
|
|
DIRECT_URL: postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=platform
|
|
|
|
# Common env_file configuration for backend services
|
|
x-backend-env-files: &backend-env-files
|
|
env_file:
|
|
- backend/.env.default # Base defaults (always exists)
|
|
- path: backend/.env # User overrides (optional)
|
|
required: false
|
|
|
|
services:
|
|
migrate:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: migrate
|
|
command: ["sh", "-c", "prisma generate && python3 scripts/gen_prisma_types_stub.py && prisma migrate deploy"]
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/migrations
|
|
action: rebuild
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
networks:
|
|
- app-network
|
|
restart: on-failure
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"prisma migrate status | grep -q 'No pending migrations' || exit 1",
|
|
]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 5s
|
|
|
|
redis:
|
|
image: redis:latest
|
|
ports:
|
|
- "6379:6379"
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
rabbitmq:
|
|
image: rabbitmq:4.1.4
|
|
container_name: rabbitmq
|
|
healthcheck:
|
|
test: rabbitmq-diagnostics -q ping
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 10s
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "5672:5672"
|
|
|
|
rest_server:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["rest"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8006:8006"
|
|
volumes:
|
|
- workspace-data:/app/autogpt_platform/backend/workspaces
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
executor:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["executor"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
database_manager:
|
|
condition: service_started
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8002:8002"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
copilot_executor:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["python", "-u", "-m", "backend.copilot.executor"]
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
database_manager:
|
|
condition: service_started
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
PYTHONUNBUFFERED: "1"
|
|
ports:
|
|
- "8008:8008"
|
|
volumes:
|
|
- workspace-data:/app/autogpt_platform/backend/workspaces
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
websocket_server:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["ws"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
database_manager:
|
|
condition: service_started
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8001:8001"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
database_manager:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["db"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8005:8005"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
scheduler_server:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["scheduler"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
database_manager:
|
|
condition: service_started
|
|
# healthcheck:
|
|
# test:
|
|
# [
|
|
# "CMD",
|
|
# "curl",
|
|
# "-f",
|
|
# "-X",
|
|
# "POST",
|
|
# "http://localhost:8003/health_check",
|
|
# ]
|
|
# interval: 10s
|
|
# timeout: 10s
|
|
# retries: 5
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8003:8003"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
notification_server:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/backend/Dockerfile
|
|
target: server
|
|
command: ["notification"] # points to entry in [tool.poetry.scripts] in pyproject.toml
|
|
develop:
|
|
watch:
|
|
- path: ./
|
|
target: autogpt_platform/backend/
|
|
action: rebuild
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
database_manager:
|
|
condition: service_started
|
|
<<: *backend-env-files
|
|
environment:
|
|
<<: *backend-env
|
|
ports:
|
|
- "8007:8007"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
frontend:
|
|
build:
|
|
context: ../
|
|
dockerfile: autogpt_platform/frontend/Dockerfile
|
|
target: prod
|
|
args:
|
|
NEXT_PUBLIC_PW_TEST: ${NEXT_PUBLIC_PW_TEST:-false}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
ports:
|
|
- "3000:3000"
|
|
networks:
|
|
- app-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
# Load environment variables in order (later overrides earlier)
|
|
env_file:
|
|
- path: ./frontend/.env.default # Base defaults (always exists)
|
|
- path: ./frontend/.env # User overrides (optional)
|
|
required: false
|
|
environment:
|
|
# Server-side environment variables (Docker service names)
|
|
# These override the localhost URLs from env files when running in Docker
|
|
AUTH_CALLBACK_URL: http://rest_server:8006/auth/callback
|
|
SUPABASE_URL: http://kong:8000
|
|
AGPT_SERVER_URL: http://rest_server:8006/api
|
|
AGPT_WS_SERVER_URL: ws://websocket_server:8001/ws
|
|
volumes:
|
|
workspace-data:
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|