-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.staging.yml
More file actions
88 lines (85 loc) · 2.06 KB
/
docker-compose.staging.yml
File metadata and controls
88 lines (85 loc) · 2.06 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
# docker-compose.staging.yml -- Staging environment override
# Usage: docker compose -f docker-compose.yml -f docker-compose.staging.yml --env-file .env.staging up -d
#
# Staging mirrors production behavior (gunicorn, info logging, restart policies)
# but exposes the API port for debugging and uses distinct container names/ports
# so it can coexist with dev on the same host if needed.
services:
api:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile.api
container_name: tod_staging_api
ports:
- "8081:8000"
env_file: .env.staging
environment:
ENVIRONMENT: staging
LOG_LEVEL: info
GUNICORN_WORKERS: "2"
command: ["gunicorn", "app.main:app", "--config", "gunicorn.conf.py"]
volumes:
- ./docker-data/staging-git-store:/data/git-store
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
nats:
condition: service_healthy
deploy:
resources:
limits:
memory: 512M
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
- tod
poller:
build:
context: ./poller
dockerfile: ./Dockerfile
container_name: tod_staging_poller
env_file: .env.staging
environment:
ENVIRONMENT: staging
LOG_LEVEL: info
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
nats:
condition: service_healthy
deploy:
resources:
limits:
memory: 256M
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
- tod
frontend:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile.frontend
container_name: tod_staging_frontend
ports:
- "3080:80"
depends_on:
- api
deploy:
resources:
limits:
memory: 64M
restart: unless-stopped
networks:
- tod