File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : " 3"
2+ services :
3+
4+ redis :
5+ image : redis:alpine
6+ networks :
7+ - frontend
8+ deploy :
9+ replicas : 1
10+ update_config :
11+ parallelism : 2
12+ delay : 10s
13+ restart_policy :
14+ condition : on-failure
15+ db :
16+ image : postgres:9.4
17+ volumes :
18+ - db-data:/var/lib/postgresql/data
19+ environment :
20+ POSTGRES_DB : " db"
21+ POSTGRES_HOST_AUTH_METHOD : " trust"
22+ networks :
23+ - backend
24+ deploy :
25+ placement :
26+ constraints : [node.role == manager]
27+ vote :
28+ image : dockersamples/examplevotingapp_vote:before
29+ ports :
30+ - 5000:80
31+ networks :
32+ - frontend
33+ depends_on :
34+ - redis
35+ deploy :
36+ replicas : 2
37+ update_config :
38+ parallelism : 2
39+ restart_policy :
40+ condition : on-failure
41+ result :
42+ image : dockersamples/examplevotingapp_result:before
43+ ports :
44+ - 5001:80
45+ networks :
46+ - backend
47+ depends_on :
48+ - db
49+ deploy :
50+ replicas : 1
51+ update_config :
52+ parallelism : 2
53+ delay : 10s
54+ restart_policy :
55+ condition : on-failure
56+
57+ worker :
58+ image : dockersamples/examplevotingapp_worker
59+ networks :
60+ - frontend
61+ - backend
62+ depends_on :
63+ - db
64+ - redis
65+ deploy :
66+ mode : replicated
67+ replicas : 1
68+ labels : [APP=VOTING]
69+ restart_policy :
70+ condition : on-failure
71+ delay : 10s
72+ max_attempts : 3
73+ window : 120s
74+ placement :
75+ constraints : [node.role == manager]
76+
77+ visualizer :
78+ image : dockersamples/visualizer:stable
79+ ports :
80+ - " 8080:8080"
81+ stop_grace_period : 1m30s
82+ volumes :
83+ - " /var/run/docker.sock:/var/run/docker.sock"
84+ deploy :
85+ placement :
86+ constraints : [node.role == manager]
87+
88+ networks :
89+ frontend :
90+ backend :
91+
92+ volumes :
93+ db-data :
You can’t perform that action at this time.
0 commit comments