-
Notifications
You must be signed in to change notification settings - Fork 49
/
stack.yml
53 lines (46 loc) · 838 Bytes
/
stack.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
version: '3'
networks:
frontend_net:
driver: overlay
backend_net:
driver: overlay
services:
database:
image: mongo:3.4
networks:
backend_net:
aliases:
- database
ports:
- "27017:27017"
queue:
image: redis:3.2
networks:
backend_net:
aliases:
- queue
ports:
- "6379:6379"
healthcheck:
test: '[ $$(redis-cli ping) = "PONG" ] || exit 1 ]'
timeout: 2s
interval: 5s
retries: 5
worker:
image: worker
networks:
- backend_net
vote:
image: vote
networks:
frontend_net:
aliases:
- vote
backend_net:
ports:
- "3000:3000"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost" ]
timeout: 1s
interval: 5s
retries: 10