File tree Expand file tree Collapse file tree 3 files changed +40
-20
lines changed Expand file tree Collapse file tree 3 files changed +40
-20
lines changed Original file line number Diff line number Diff line change 11version : ' 3.7'
22
3+ x-default-opts :
4+ &default-opts
5+ logging :
6+ options :
7+ max-size : " 10m"
8+
9+ networks :
10+ ntw_front :
11+ external : true
12+ portainer :
13+ driver : overlay
14+
15+ volumes :
16+ portainer_data :
17+
318services :
419
520 portainer :
21+ << : *default-opts
622 image : portainer/portainer
723 command : -H tcp://tasks.agent:9001 --tlsskipverify
824 # managed by Traefik
@@ -41,6 +57,7 @@ services:
4157 - " traefik.frontend.rule=PathPrefix:/portainer;ReplacePathRegex: ^/portainer/(.*) /$$1"
4258
4359 agent :
60+ << : *default-opts
4461 image : portainer/agent
4562 environment :
4663 AGENT_CLUSTER_ADDR : tasks.agent
@@ -59,11 +76,4 @@ services:
5976 reservations :
6077 memory : 4M
6178
62- networks :
63- ntw_front :
64- external : true
65- portainer :
66- driver : overlay
67-
68- volumes :
69- portainer_data:
79+ # https://github.com/pascalandy/docker-stack-this
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ x-default-opts:
44 &default-opts
55 logging :
66 options :
7- max-size : " 1m "
7+ max-size : " 10m "
88
99networks :
1010 ntw_front :
@@ -32,6 +32,8 @@ services:
3232 placement :
3333 constraints :
3434 - node.role == manager
35+ restart_policy :
36+ condition : on-failure
3537 resources :
3638 limits :
3739 cpus : ' 0.20'
Original file line number Diff line number Diff line change 11version : ' 3.7'
22
3+ x-default-opts :
4+ &default-opts
5+ logging :
6+ options :
7+ max-size : " 10m"
8+
39networks :
410 ntw_front :
511 external : true
612
713services :
814
915 home :
16+ << : *default-opts
1017 image : abiosoft/caddy:0.11.1-no-stats
1118 networks :
1219 - ntw_front
1320 # volumes:
14- # this path is different on YOUR stack
15- # - /root/docker-stack-this/traefik_stack5/www/home/srv:/srv
21+ # - /localhost/www/home/srv:/srv
1622 deploy :
1723 mode : replicated
1824 replicas : 2
1925 # placement:
2026 # constraints: [node.role==manager]
2127 restart_policy :
22- condition : any
28+ condition : on-failure
2329 max_attempts : 10
2430 resources :
2531 limits :
@@ -43,19 +49,19 @@ services:
4349 - " traefik.backend.loadbalancer.method=drr"
4450
4551 who1 :
52+ << : *default-opts
4653 image : nginx:1.15-alpine
4754 networks :
4855 - ntw_front
4956 # volumes:
50- # this path is different on YOUR stack
51- # - /root/docker-stack-this/traefik_stack5/www/who1/srv:/srv
57+ # - /localhost/www/who1/srv:/srv
5258 deploy :
5359 mode : replicated
54- replicas : 2
60+ replicas : 1
5561 # placement:
5662 # constraints: [node.role==manager]
5763 restart_policy :
58- condition : any
64+ condition : on-failure
5965 max_attempts : 10
6066 resources :
6167 limits :
@@ -77,16 +83,17 @@ services:
7783 - " traefik.backend.loadbalancer.method=drr"
7884
7985 who2 :
86+ << : *default-opts
8087 image : emilevauge/whoami
8188 networks :
8289 - ntw_front
8390 deploy :
8491 mode : replicated
85- replicas : 2
92+ replicas : 1
8693 # placement:
8794 # constraints: [node.role==manager]
8895 restart_policy :
89- condition : any
96+ condition : on-failure
9097 max_attempts : 10
9198 resources :
9299 limits :
@@ -108,16 +115,17 @@ services:
108115 - " traefik.backend.loadbalancer.method=drr"
109116
110117 who3 :
118+ << : *default-opts
111119 image : emilevauge/whoami
112120 networks :
113121 - ntw_front
114122 deploy :
115123 mode : replicated
116- replicas : 2
124+ replicas : 1
117125 # placement:
118126 # constraints: [node.role==manager]
119127 restart_policy :
120- condition : any
128+ condition : on-failure
121129 max_attempts : 10
122130 resources :
123131 limits :
You can’t perform that action at this time.
0 commit comments