-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
122 lines (110 loc) · 2.71 KB
/
docker-compose.prod.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: "3"
services:
juwo:
image: ${DOCKER_REPO}:${JUWO_IMAGE_PROD_TAG:-latest}
ports:
- "9091:9091"
environment:
ENV: PROD
# env_file: docker-production.env
labels:
io.aroyd.service.container.name: "juwo"
io.aroyd.servcie.container.env: "production"
deploy:
mode: replicated
replicas: 4
placement:
constraints:
- node.role == worker
update_config:
parallelism: 2
delay: 30s
failure_action: pause
monitor: 20s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
mongodb:
image: mongo:3.4.3
labels:
io.aroyd.service.container.name: "mongodb"
io.aroyd.servcie.container.env: "production"
deploy:
placement:
constraints:
- engine.labels.io.aroyd.machine.aws.az == b
update_config:
parallelism: 1
delay: 10s
failure_action: pause
monitor: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
volumes:
- mongodb_data_volume:${MONGODB_DATA_DIR:-/data/db}
redis:
image: redis:3.2.8-alpine
labels:
io.aroyd.service.container.name: "redis"
io.aroyd.servcie.container.env: "production"
deploy:
placement:
constraints:
- engine.labels.io.aroyd.machine.aws.az == a
update_config:
parallelism: 1
delay: 10s
failure_action: pause
monitor: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
volumes:
- redis_data_volume:${REDIS_DATA_DIR:-/data}
rabbitmq:
image: rabbitmq:3.6.9-alpine
labels:
io.aroyd.service.container.name: "rabbitmq"
io.aroyd.servcie.container.env: "production"
deploy:
placement:
constraints:
- engine.labels.io.aroyd.machine.aws.az == b
update_config:
parallelism: 1
delay: 10s
failure_action: pause
monitor: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
volumes:
- rabbitmq_data_volume:${RABBITMQ_DATA_DIR:-/var/lib/rabbitmq}
volumes:
mongodb_data_volume:
driver: rexray
driver_opts:
volumeType: "gp2"
size: "4"
availabilityZone: "ap-south-1b"
redis_data_volume:
driver: rexray
driver_opts:
volumeType: "gp2"
size: "4"
availabilityZone: "ap-south-1a"
rabbitmq_data_volume:
driver: rexray
driver_opts:
volumeType: "gp2"
size: "4"
availabilityZone: "ap-south-1b"