-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.server.yml
More file actions
75 lines (73 loc) · 2.25 KB
/
docker-compose.server.yml
File metadata and controls
75 lines (73 loc) · 2.25 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
services:
redis:
image: redis:7
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
intake-api:
image: ${AGENT_FACTORY_IMAGE:-ghcr.io/speedscale/agent-factory:v0.1.0}
build:
context: .
dockerfile: Dockerfile
command: ["node", "dist/bin/intake-api.js"]
environment:
RUN_QUEUE_BACKEND: ${RUN_QUEUE_BACKEND:-filesystem}
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
REDIS_QUEUE_KEY: ${REDIS_QUEUE_KEY:-agent-factory:runs:queued}
RUN_QUEUE_BATCH_SIZE: ${RUN_QUEUE_BATCH_SIZE:-25}
INTAKE_API_TOKEN: ${INTAKE_API_TOKEN:-}
restart: unless-stopped
ports:
- "8080:8080"
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"fetch('http://127.0.0.1:8080/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""
]
interval: 15s
timeout: 5s
retries: 5
volumes:
- ./artifacts:/app/artifacts
- ./.work:/app/.work
- ./examples:/app/examples:ro
worker:
image: ${AGENT_FACTORY_IMAGE:-ghcr.io/speedscale/agent-factory:v0.1.0}
build:
context: .
dockerfile: Dockerfile
command:
- /bin/sh
- -lc
- |
SOURCE="${WORKER_SOURCE:-/app/.work/demo-fixture}"
if [ "$$SOURCE" = "/app/.work/demo-fixture" ]; then
node dist/bin/create-demo-fixture.js
fi
node dist/bin/worker.js --source "$$SOURCE"
environment:
RUN_QUEUE_BACKEND: ${RUN_QUEUE_BACKEND:-filesystem}
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
REDIS_QUEUE_KEY: ${REDIS_QUEUE_KEY:-agent-factory:runs:queued}
RUN_QUEUE_BATCH_SIZE: ${RUN_QUEUE_BATCH_SIZE:-25}
WORKER_SOURCE: ${WORKER_SOURCE:-/app/.work/demo-fixture}
WORKER_METRICS_PORT: ${WORKER_METRICS_PORT:-9090}
PATH: /app/.work/demo-fixture/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./artifacts:/app/artifacts
- ./.work:/app/.work
- ./examples:/app/examples:ro
depends_on:
intake-api:
condition: service_healthy
redis:
condition: service_healthy