-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
93 lines (89 loc) · 1.79 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
version: "3.8"
services:
proxy:
image: valian/docker-nginx-auto-ssl
deploy:
placement:
constraints:
- "node.labels.web==true"
restart: always
ports:
- mode: host
protocol: tcp
published: 80
target: 80
- mode: host
protocol: tcp
published: 443
target: 443
volumes:
- ssl_data:/etc/resty-auto-ssl
depends_on:
- guppe
env_file: '.env'
logging:
driver: local
options:
max-size: '100m'
guppe:
image: datatitian/guppe
deploy:
mode: replicated
replicas: 4
placement:
constraints:
- "node.labels.web==true"
restart: always
env_file: '.env'
environment:
DB_URL: 'mongodb://mongodb:27017'
PROXY_MODE: 1
depends_on:
- mongodb
logging:
driver: local
options:
max-size: '100m'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8085"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
worker1:
image: datatitian/guppe
command: [ "node", "deliveryWorker.js" ]
deploy:
mode: replicated
replicas: 25
placement:
constraints:
- "node.labels.delivery==true"
restart: always
env_file: '.env'
environment:
DB_URL: 'mongodb://mongodb:27017'
depends_on:
- mongodb
logging:
driver: local
options:
max-size: '100m'
mongodb:
image: mongo:4.2
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- "node.labels.database==true"
restart: always
volumes:
- mongo-data:/data/db
logging:
driver: local
options:
max-size: '100m'
volumes:
mongo-data:
ssl_data: