-
Notifications
You must be signed in to change notification settings - Fork 40
/
pets-prod-compose.yml
65 lines (59 loc) · 1.72 KB
/
pets-prod-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
version: '3.1'
services:
web:
image: chrch/docker-pets:1.0
deploy:
mode: replicated
replicas: 2
labels:
com.docker.ucp.mesh.http.5000: "external_route=http://<pets.url>,internal_port=5000"
com.docker.ucp.mesh.http.7000: "external_route=http://<admin.url>,internal_port=7000,sticky_sessions=paas_admin_id"
ports:
- 5000
- 7000
healthcheck:
interval: 10s
timeout: 2s
retries: 3
environment:
DB: 'db'
DEBUG: 'False'
THREADED: 'True'
ADMIN_PASSWORD_FILE: '/run/secrets/admin_password'
networks:
- backend
- ucp-hrm
secrets:
- admin_password
db:
image: consul:0.7.2
command: agent -server -ui -client=0.0.0.0 -bootstrap-expect=3 -retry-join=db -retry-join=db -retry-join=db -retry-interval 5s
deploy:
replicas: 3
ports:
- 8500
environment:
CONSUL_BIND_INTERFACE: 'eth2'
CONSUL_LOCAL_CONFIG: '{"skip_leave_on_interrupt": true}'
networks:
- backend
viz:
image: manomarks/visualizer
ports:
- 8080
deploy:
placement:
constraints: [node.role == manager]
labels:
com.docker.ucp.mesh.http.8080: "external_route=http://<viz.url>,internal_port=8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- ucp-hrm
networks:
backend:
ucp-hrm:
external: true
secrets:
admin_password:
external: true