-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (92 loc) · 3.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
96 lines (92 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
control-plane:
image: agentfield/control-plane:latest
ports:
- "8080:8080"
environment:
- AGENTFIELD_HTTP_ADDR=0.0.0.0:8080
- AGENTFIELD_STORAGE_MODE=local
volumes:
- agentfield-data:/data
# Ephemeral Postgres for build-time integration checks. Repo-agnostic: it
# ships an empty database and the *target repo's own* integration global-setup
# migrates it, so the factory needs no schema knowledge. Tests that hard-require
# a DB (e.g. REQUIRE_TEST_DB=1 …) can connect via DATABASE_URL_TEST instead of
# failing at the connection layer (pg-pool ECONNREFUSED) and cascading.
#
# The data is intentionally throwaway (no volume). One shared DB means
# DB-dependent builds should run one at a time; per-build databases would be
# the next step if concurrent DB builds are needed.
build-db:
image: postgres:16
environment:
- POSTGRES_USER=${BUILD_DB_USER:-builder}
- POSTGRES_PASSWORD=${BUILD_DB_PASSWORD:-builder}
- POSTGRES_DB=${BUILD_DB_NAME:-buildtest}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${BUILD_DB_USER:-builder} -d ${BUILD_DB_NAME:-buildtest}"]
interval: 5s
timeout: 3s
retries: 30
swe-agent:
build:
context: .
dockerfile: Dockerfile
env_file: .env
environment:
- AGENTFIELD_SERVER=http://control-plane:8080
- NODE_ID=swe-planner
- PORT=8003
- AGENT_CALLBACK_URL=http://swe-agent:8003
- SWE_DEFAULT_RUNTIME=${SWE_DEFAULT_RUNTIME:-claude_code}
- SWE_DEFAULT_MODEL=${SWE_DEFAULT_MODEL:-}
- SWE_CODEX_AUTH_MODE=${SWE_CODEX_AUTH_MODE:-auto}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- DATABASE_URL_TEST=${DATABASE_URL_TEST:-postgres://builder:builder@build-db:5432/buildtest}
ports:
- "8003:8003"
volumes:
- workspaces:/workspaces
- ${HOME}/.codex:/root/.codex
depends_on:
control-plane:
condition: service_started
build-db:
condition: service_healthy
deploy:
replicas: 1 # Scale with: docker compose up --scale swe-agent=3
swe-fast:
build:
context: .
dockerfile: Dockerfile
command: ["python", "-m", "swe_af.fast"]
env_file: .env
environment:
- AGENTFIELD_SERVER=http://control-plane:8080
- NODE_ID=swe-fast
- PORT=8004
- AGENT_CALLBACK_URL=http://swe-fast:8004
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN}
- GH_TOKEN=${GH_TOKEN}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
- OPENCODE_MODEL=${OPENCODE_MODEL:-}
- SWE_DEFAULT_RUNTIME=${SWE_DEFAULT_RUNTIME:-claude_code}
- SWE_DEFAULT_MODEL=${SWE_DEFAULT_MODEL:-}
- SWE_CODEX_AUTH_MODE=${SWE_CODEX_AUTH_MODE:-auto}
- DATABASE_URL_TEST=${DATABASE_URL_TEST:-postgres://builder:builder@build-db:5432/buildtest}
ports:
- "8004:8004"
volumes:
- workspaces:/workspaces
- ${HOME}/.codex:/root/.codex
depends_on:
control-plane:
condition: service_started
build-db:
condition: service_healthy
volumes:
agentfield-data:
workspaces: