-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yml
63 lines (58 loc) · 1.39 KB
/
docker-compose.production.yml
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
services:
db:
image: postgres:16.3-alpine3.19
volumes:
- db-production:/var/lib/postgresql/data
env_file: '.env.production'
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
db-migration:
image: aryyadocker/swarm-orchestra-101-db-migrate:1.0
volumes:
- ./backend-service/db/migrations:/migrations
env_file: '.env.production'
command:
['-path=/migrations', '-database', '${POSTGRES_SOURCE}', '-verbose', 'up']
depends_on:
- db
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
backend:
image: aryyadocker/swarm-orchestra-101-backend-production:1.0
deploy:
replicas: 3
update_config:
parallelism: 2
restart_policy:
condition: on-failure
frontend:
image: aryyadocker/swarm-orchestra-101-frontend-production:1.0
ports:
- 80:80
depends_on:
- backend
deploy:
replicas: 2
update_config:
parallelism: 2
restart_policy:
condition: on-failure
visualizer:
image: bretfisher/visualizer
ports:
- 8080:8080
stop_grace_period: 1m30s
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
volumes:
db-production: