-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
351 lines (325 loc) · 11.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
351 lines (325 loc) · 11.1 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# Agent Studio one-box deployment. The default uses published images and a
# persistent, one-shot credential bootstrap. Source builds are under dev only.
name: agent-studio
x-logging: &bounded-logs
driver: json-file
options: {max-size: "10m", max-file: "3"}
x-task-server: &task-server
restart: unless-stopped
depends_on:
bootstrap: {condition: service_completed_successfully}
ports:
- "127.0.0.1:${STUDIO_TASKSERVER_PORT:-5071}:5071"
environment:
LISTEN_URL: http://0.0.0.0:5071
STORE_PATH: /var/lib/agent-orchestrator/store
BACKUP_PATH: /var/lib/agent-orchestrator/backup
AUTH: bearer
STUDIO_AUTH_TOKEN_FILE: /run/agent-studio-secrets/studio_token
ENGINE_AUTH_TOKEN_FILE: /run/agent-studio-secrets/engine_token
BOOTSTRAP_RUNNER_ID: distributed-runner
BOOTSTRAP_RUNNER_AUTH_TOKEN_FILE: /run/agent-studio-secrets/runner_token
volumes:
- store:/var/lib/agent-orchestrator/store
- backup:/var/lib/agent-orchestrator/backup
- secrets:/run/agent-studio-secrets:ro
networks: [control]
mem_limit: 2g
cpus: 2
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:5071/readyz"]
interval: 5s
timeout: 3s
retries: 24
start_period: 10s
logging: *bounded-logs
x-engine: &engine
restart: unless-stopped
environment:
SERVER_URL: http://task-server:5071
CLIENT_ID: orchestrator-engine
CLIENT_CREDENTIAL_FILE: /run/agent-studio-secrets/engine_token
ENGINE_ALLOW_INSECURE_HTTP: "1"
volumes:
- secrets:/run/agent-studio-secrets:ro
networks: [control]
mem_limit: 1g
cpus: 2
healthcheck:
test: ["CMD", "dotnet", "orchestrator-engine.dll", "--health-check"]
interval: 10s
timeout: 5s
retries: 6
start_period: 15s
logging: *bounded-logs
x-bff: &bff
restart: unless-stopped
environment:
TaskServer__BaseUrl: http://task-server:5071
TaskServer__AuthTokenFile: /run/agent-studio-secrets/studio_token
volumes:
- secrets:/run/agent-studio-secrets:ro
networks: [control]
mem_limit: 512m
cpus: 1
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:5072/healthz"]
interval: 5s
timeout: 3s
retries: 24
start_period: 10s
logging: *bounded-logs
x-api: &api
restart: unless-stopped
environment:
TaskRepository: /data/workspace
TaskServer__BaseUrl: http://task-server:5071
TaskServer__AuthTokenFile: /run/agent-studio-secrets/studio_token
volumes:
- workspace:/data/workspace
- projects:/data/projects
- secrets:/run/agent-studio-secrets:ro
networks: [control]
mem_limit: 2g
cpus: 2
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:5031/healthz"]
interval: 5s
timeout: 3s
retries: 24
start_period: 10s
logging: *bounded-logs
x-web: &web
restart: unless-stopped
ports:
- "${STUDIO_UI_BIND:-127.0.0.1}:${STUDIO_UI_PORT:-4011}:8080"
environment:
STUDIO_API_UPSTREAM: orchestrator-api:5031
STUDIO_BFF_UPSTREAM: studio-bff:5072
networks: [control]
mem_limit: 512m
cpus: 1
healthcheck:
test: ["CMD", "wget", "--quiet", "--output-document=-", "http://127.0.0.1:8080/healthz"]
interval: 5s
timeout: 3s
retries: 12
start_period: 5s
logging: *bounded-logs
x-runner: &runner
restart: unless-stopped
environment:
RUNNER_SERVER_URL: http://task-server:5071
RUNNER_ID: distributed-runner
RUNNER_NAME: distributed-runner
RUNNER_ALLOW_INSECURE_HTTP: "1"
RUNNER_AUTH_TOKEN_FILE: /run/agent-studio-secrets/runner_token
RUNNER_GIT_REMOTE: ${RUNNER_GIT_REMOTE:-}
RUNNER_GIT_PUSH_REMOTE: ${RUNNER_GIT_PUSH_REMOTE:-}
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: credential.helper
GIT_CONFIG_VALUE_0: store --file=/home/runner/.git-credentials
volumes:
- runner-workspaces:/var/lib/agent-host
- secrets:/run/agent-studio-secrets:ro
- ${RUNNER_CLAUDE_CREDENTIALS_DIR:-./deploy/compose/empty-credentials}:/home/runner/.claude
- ${RUNNER_CODEX_CREDENTIALS_DIR:-./deploy/compose/empty-credentials}:/home/runner/.codex
- ${RUNNER_GEMINI_CREDENTIALS_DIR:-./deploy/compose/empty-credentials}:/home/runner/.config/gemini
- ${RUNNER_SSH_CREDENTIALS_DIR:-./deploy/compose/empty-credentials}:/home/runner/.ssh:ro
- ${RUNNER_GIT_CREDENTIALS_FILE:-./deploy/compose/empty-credentials/git-credentials}:/home/runner/.git-credentials:ro
networks: [control, runner]
mem_limit: 4g
cpus: 4
healthcheck:
test: ["CMD", "dotnet", "/opt/agent-host/agent-host.dll", "--health-check"]
interval: 15s
timeout: 10s
retries: 6
start_period: 20s
logging: *bounded-logs
services:
bootstrap:
image: ghcr.io/agent-orc/agent-task-server:v${AGENT_STUDIO_VERSION:-0.9.1}
user: "0:0"
entrypoint: ["/bin/sh", "/opt/compose-secret-bootstrap.sh"]
restart: "no"
volumes:
- secrets:/run/agent-studio-secrets
- store:/var/lib/agent-orchestrator/store
- backup:/var/lib/agent-orchestrator/backup
- workspace:/data/workspace
- projects:/data/projects
- runner-workspaces:/var/lib/agent-host
- ./scripts/compose-secret-bootstrap.sh:/opt/compose-secret-bootstrap.sh:ro
networks: [control]
mem_limit: 128m
cpus: 0.5
logging: *bounded-logs
task-server:
<<: *task-server
image: ghcr.io/agent-orc/agent-task-server:v${AGENT_STUDIO_VERSION:-0.9.1}
credential-manager:
image: ghcr.io/agent-orc/agent-task-server:v${AGENT_STUDIO_VERSION:-0.9.1}
profiles: [ops]
user: "0:0"
entrypoint: ["/bin/sh", "/opt/compose-rotate-credentials.sh"]
volumes:
- secrets:/run/agent-studio-secrets
- ./scripts/compose-rotate-credentials.sh:/opt/compose-rotate-credentials.sh:ro
networks: [control]
mem_limit: 128m
cpus: 0.5
logging: *bounded-logs
orchestrator-engine:
<<: *engine
image: ghcr.io/agent-orc/agent-orchestrator-engine:v${AGENT_STUDIO_VERSION:-0.9.1}
depends_on:
task-server: {condition: service_healthy}
studio-bff:
<<: *bff
image: ghcr.io/agent-orc/agent-studio-bff:v${AGENT_STUDIO_VERSION:-0.9.1}
depends_on:
task-server: {condition: service_healthy}
orchestrator-api:
<<: *api
image: ghcr.io/agent-orc/agent-studio-api:v${AGENT_STUDIO_VERSION:-0.9.1}
depends_on:
task-server: {condition: service_healthy}
web:
<<: *web
image: ghcr.io/agent-orc/agent-studio-web:v${AGENT_STUDIO_VERSION:-0.9.1}
depends_on:
orchestrator-api: {condition: service_healthy}
studio-bff: {condition: service_healthy}
agent-host-distributed:
<<: *runner
image: ghcr.io/agent-orc/agent-host:v${AGENT_STUDIO_VERSION:-0.9.1}
depends_on:
task-server: {condition: service_healthy}
edge:
image: caddy:${CADDY_VERSION:-2.10-alpine}
profiles: [edge]
restart: unless-stopped
ports:
- "${STUDIO_EDGE_BIND:-127.0.0.1}:${STUDIO_EDGE_PORT:-8443}:443"
environment:
STUDIO_EDGE_HOSTNAME: ${STUDIO_EDGE_HOSTNAME:-localhost}
volumes:
- ./deploy/compose/Caddyfile.edge:/etc/caddy/Caddyfile:ro
- edge-data:/data
- edge-config:/config
networks: [control]
depends_on:
web: {condition: service_healthy}
mem_limit: 256m
cpus: 1
logging: *bounded-logs
task-server-dev:
<<: *task-server
build: {context: ., dockerfile: task-server/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
depends_on:
bootstrap-dev: {condition: service_completed_successfully}
profiles: [dev]
credential-manager-dev:
build: {context: ., dockerfile: task-server/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
profiles: [dev]
user: "0:0"
entrypoint: ["/bin/sh", "/opt/compose-rotate-credentials.sh"]
environment:
TASK_SERVER_URL: http://task-server-dev:5071
volumes:
- secrets:/run/agent-studio-secrets
- ./scripts/compose-rotate-credentials.sh:/opt/compose-rotate-credentials.sh:ro
networks: [control]
mem_limit: 128m
cpus: 0.5
logging: *bounded-logs
bootstrap-dev:
build: {context: ., dockerfile: task-server/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
user: "0:0"
entrypoint: ["/bin/sh", "/opt/compose-secret-bootstrap.sh"]
restart: "no"
volumes:
- secrets:/run/agent-studio-secrets
- store:/var/lib/agent-orchestrator/store
- backup:/var/lib/agent-orchestrator/backup
- workspace:/data/workspace
- projects:/data/projects
- runner-workspaces:/var/lib/agent-host
- ./scripts/compose-secret-bootstrap.sh:/opt/compose-secret-bootstrap.sh:ro
networks: [control]
mem_limit: 128m
cpus: 0.5
logging: *bounded-logs
profiles: [dev]
orchestrator-engine-dev:
<<: *engine
build: {context: ., dockerfile: orchestrator-engine/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
environment:
SERVER_URL: http://task-server-dev:5071
CLIENT_ID: orchestrator-engine
CLIENT_CREDENTIAL_FILE: /run/agent-studio-secrets/engine_token
ENGINE_ALLOW_INSECURE_HTTP: "1"
depends_on:
task-server-dev: {condition: service_healthy}
profiles: [dev]
studio-bff-dev:
<<: *bff
build: {context: ., dockerfile: studio-bff/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
environment:
TaskServer__BaseUrl: http://task-server-dev:5071
TaskServer__AuthTokenFile: /run/agent-studio-secrets/studio_token
depends_on:
task-server-dev: {condition: service_healthy}
profiles: [dev]
orchestrator-api-dev:
<<: *api
build: {context: ., dockerfile: backend/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
environment:
TaskRepository: /data/workspace
TaskServer__BaseUrl: http://task-server-dev:5071
TaskServer__AuthTokenFile: /run/agent-studio-secrets/studio_token
depends_on:
task-server-dev: {condition: service_healthy}
profiles: [dev]
web-dev:
<<: *web
build: {context: ., dockerfile: frontend/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
environment:
STUDIO_API_UPSTREAM: orchestrator-api-dev:5031
STUDIO_BFF_UPSTREAM: studio-bff-dev:5072
depends_on:
orchestrator-api-dev: {condition: service_healthy}
studio-bff-dev: {condition: service_healthy}
profiles: [dev]
agent-host-distributed-dev:
<<: *runner
build: {context: ., dockerfile: runner/Dockerfile, args: {VERSION: "${AGENT_STUDIO_VERSION:-0.0.0-dev}"}}
environment:
RUNNER_SERVER_URL: http://task-server-dev:5071
RUNNER_ID: distributed-runner
RUNNER_NAME: distributed-runner
RUNNER_ALLOW_INSECURE_HTTP: "1"
RUNNER_AUTH_TOKEN_FILE: /run/agent-studio-secrets/runner_token
RUNNER_GIT_REMOTE: ${RUNNER_GIT_REMOTE:-}
RUNNER_GIT_PUSH_REMOTE: ${RUNNER_GIT_PUSH_REMOTE:-}
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: credential.helper
GIT_CONFIG_VALUE_0: store --file=/home/runner/.git-credentials
depends_on:
task-server-dev: {condition: service_healthy}
profiles: [dev]
volumes:
store:
backup:
workspace:
projects:
runner-workspaces:
secrets:
edge-data:
edge-config:
networks:
control:
internal: false
runner:
internal: false