-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
150 lines (142 loc) · 4.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
150 lines (142 loc) · 4.77 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
# ── Postgres — job state storage ──────────────────────────────────────────
postgres:
image: postgres:16-alpine
container_name: acoda-postgres
restart: unless-stopped
environment:
POSTGRES_USER: factory
POSTGRES_PASSWORD: factory
POSTGRES_DB: acoda_factory
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U factory -d acoda_factory"]
interval: 5s
timeout: 5s
retries: 10
networks:
- factory-net
# ── Temporal — durable workflow orchestration ─────────────────────────────
temporal:
image: temporalio/auto-setup:1.24
container_name: acoda-temporal
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DB: postgres12
DB_PORT: 5432
POSTGRES_USER: factory
POSTGRES_PWD: factory
POSTGRES_SEEDS: 172.17.0.1
DYNAMIC_CONFIG_FILE_PATH: /etc/temporal/config/dynamicconfig.yaml
volumes:
- ./docker/temporal/dynamicconfig.yaml:/etc/temporal/config/dynamicconfig.yaml:ro
ports:
- "7233:7233"
networks:
- factory-net
healthcheck:
test: ["CMD", "temporal", "workflow", "list", "--namespace", "default"]
interval: 10s
timeout: 10s
retries: 15
start_period: 30s
# ── Temporal UI — workflow dashboard ──────────────────────────────────────
temporal-ui:
image: temporalio/ui:2.26.2
container_name: acoda-temporal-ui
restart: unless-stopped
depends_on:
- temporal
environment:
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_CORS_ORIGINS: "http://localhost:3020"
ports:
- "8233:8080"
networks:
- factory-net
# ── Pool Manager — warm FORGE slot manager (Rust) ─────────────────────────
pool-manager:
build:
context: ./factory-core/pool-manager
dockerfile: ../../docker/pool-manager/Dockerfile
container_name: acoda-pool
restart: unless-stopped
environment:
POOL_WARM_SLOTS: ${POOL_WARM_SLOTS:-3}
RUST_LOG: info
ports:
- "3200:3200"
networks:
- factory-net
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:3200/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# ── FORGE Worker — AI coding agent (x3 parallel workers) ─────────────────
forge-worker:
build:
context: ./factory-core/forge-agent
dockerfile: ../../docker/forge-agent/Dockerfile
restart: unless-stopped
deploy:
replicas: 3 # 3 warm workers — matches pool slots
depends_on:
temporal:
condition: service_healthy
pool-manager:
condition: service_healthy
environment:
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_NAMESPACE: ${TEMPORAL_NAMESPACE:-default}
GITHUB_TOKEN: ${GITHUB_TOKEN}
ORCHESTRATOR_BASE_URL: ${ORCHESTRATOR_BASE_URL:-https://api.anthropic.com/v1}
ORCHESTRATOR_API_KEY: ${ORCHESTRATOR_API_KEY}
ORCHESTRATOR_MODEL: ${ORCHESTRATOR_MODEL:-claude-3-5-haiku-20241022}
CODER_BASE_URL: ${CODER_BASE_URL:-https://api.deepseek.com/v1}
CODER_API_KEY: ${CODER_API_KEY}
CODER_MODEL: ${CODER_MODEL:-deepseek-chat}
POOL_URL: http://pool-manager:3200
DATABASE_URL: postgresql://factory:factory@postgres:5432/acoda_factory
networks:
- factory-net
# ── Factory API — job submission REST API ─────────────────────────────────
factory-api:
build:
context: ./factory-core/forge-agent
dockerfile: ../../docker/forge-agent/Dockerfile
container_name: factory-api
restart: unless-stopped
command: ["node", "dist/index.js"]
depends_on:
temporal:
condition: service_healthy
postgres:
condition: service_healthy
environment:
PORT: 3020
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_NAMESPACE: ${TEMPORAL_NAMESPACE:-default}
DATABASE_URL: postgresql://factory:factory@postgres:5432/acoda_factory
GITHUB_TOKEN: ${GITHUB_TOKEN}
ports:
- "3020:3020"
networks:
- factory-net
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:3020/api/forge/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data:
networks:
factory-net:
driver: bridge