-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.62 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.62 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
services:
api:
build:
context: ..
dockerfile: modelseed-api/Dockerfile
container_name: modelseed-api-api-1
ports:
- "3004:8000"
volumes:
- modelseed-jobs:/tmp/modelseed-jobs
environment:
MODELSEED_USE_CELERY: "true"
MODELSEED_CELERY_BROKER_URL: "redis://bioseed_redis:6379/10"
MODELSEED_CELERY_RESULT_BACKEND: "redis://bioseed_redis:6379/10"
restart: unless-stopped
networks:
- default
- bioseed_network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
worker:
build:
context: ..
dockerfile: modelseed-api/Dockerfile
container_name: celery_modelseed
command: ["python", "-m", "modelseed_api.jobs.celery_app"]
volumes:
- modelseed-jobs:/tmp/modelseed-jobs
environment:
MODELSEED_USE_CELERY: "true"
MODELSEED_CELERY_BROKER_URL: "redis://bioseed_redis:6379/10"
MODELSEED_CELERY_RESULT_BACKEND: "redis://bioseed_redis:6379/10"
restart: unless-stopped
# Give a long-running task (reconstruct + gapfill ~6-10 min, FBA ~10 s)
# time to finish on SIGTERM before docker SIGKILLs. Without this,
# Celery's prefork pool gets killed mid-LP-solve and acks_late can't
# reliably requeue (Layer D test finding, 2026-05-04).
stop_grace_period: 15m
networks:
- default
- bioseed_network
depends_on:
- api
networks:
default:
driver: bridge
bioseed_network:
external: true
volumes:
modelseed-jobs: