-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
62 lines (57 loc) · 1.39 KB
/
docker-compose.prod.yml
File metadata and controls
62 lines (57 loc) · 1.39 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
# Production overlay for VM deployment (use with base docker-compose.yml).
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# Requires DATABASE_URL in .env (e.g. Cloud SQL via host/proxy). No bundled Postgres.
services:
web:
restart: always
ports:
- "127.0.0.1:8000:8000"
environment:
LOG_FORMAT: json
DEBUG: "False"
deploy:
resources:
limits:
cpus: "1.0"
memory: 1G
healthcheck:
test:
[
"CMD-SHELL",
'if [ -n "$${HEALTH_CHECK_TOKEN:-}" ]; then curl -fsS -H "Authorization: Bearer $${HEALTH_CHECK_TOKEN}" http://127.0.0.1:8000/health/; else curl -fsS http://127.0.0.1:8000/health/; fi',
]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
celery_worker:
restart: always
command: >
celery -A config worker -l info
--max-tasks-per-child=${CELERY_MAX_TASKS_PER_CHILD:-50}
environment:
LOG_FORMAT: json
deploy:
resources:
limits:
cpus: "2.0"
memory: 2G
celery_beat:
restart: always
environment:
LOG_FORMAT: json
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
redis:
restart: always
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
selenium:
profiles: ["selenium"]