forked from Carbon-Ledger-stellar/carbonledger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
39 lines (37 loc) · 1.08 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
39 lines (37 loc) · 1.08 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
version: "3.9"
# Production overlay — rolling zero-downtime deployment.
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --no-deps --scale backend=2 backend
services:
backend:
restart: always
deploy:
replicas: 2
update_config:
parallelism: 1 # replace one replica at a time
delay: 15s # wait between each replica
failure_action: rollback
order: start-first # new container starts before old one stops
rollback_config:
parallelism: 1
failure_action: continue
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
frontend:
restart: always
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
order: start-first
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s