-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
98 lines (92 loc) · 1.88 KB
/
docker-compose.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
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
89
90
91
92
93
94
95
96
97
98
version: '3.3'
services:
mongo:
image: mongo:${MONGO_VERSION}
deploy:
placement:
constraints:
- node.labels.reliability == high
volumes:
- mongo_data:/data/db
networks:
back_net:
aliases:
- post_db
- comment_db
post:
image: ${USERNAME}/post:${POST_VERSION}
deploy:
resources:
limits:
cpus: '0.30'
memory: 300M
update_config:
delay: 10s
parallelism: 2
failure_action: rollback
restart_policy:
condition: on-failure
max_attempts: 15
delay: 1s
mode: replicated
replicas: 3
placement:
constraints:
- node.role == worker
networks:
- front_net
- back_net
comment:
image: ${USERNAME}/comment:${COMMENT_VERSION}
deploy:
resources:
limits:
cpus: '0.30'
memory: 300M
update_config:
delay: 10s
parallelism: 2
failure_action: rollback
restart_policy:
condition: on-failure
max_attempts: 15
delay: 1s
mode: replicated
replicas: 3
placement:
constraints:
- node.role == worker
networks:
- front_net
- back_net
ui:
image: ${USERNAME}/ui:${UI_VERSION}
deploy:
resources:
limits:
cpus: '0.25'
memory: 150M
update_config:
delay: 5s
parallelism: 1
failure_action: rollback
restart_policy:
condition: on-failure
max_attempts: 3
delay: 3s
mode: replicated
replicas: 3
placement:
constraints:
- node.role == worker
environment:
- ENV=DEV
ports:
- ${UI_HOST_PORT}:${UI_CONTAINER_PORT}/tcp
networks:
- front_net
volumes:
mongo_data:
networks:
back_net: {}
front_net: {}