This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-stack.yml
152 lines (143 loc) · 4.14 KB
/
docker-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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
version: "3.6"
services:
shepherd:
image: 'mazzolino/shepherd'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# /root/.docker/config.json:/root/.docker/config.json:ro
environment:
SLEEP_TIME: "5m"
BLACKLIST_SERVICES: "shepherd autoscale traefik agent"
WITH_REGISTRY_AUTH: "true"
DOCKER_HOST: "unix:///var/run/docker.sock"
deploy:
restart_policy:
condition: on-failure
mode: global
placement:
constraints: [node.role == manager]
labels:
traefik.enable: "false"
orbiter: "false"
autoscale:
image: gianarb/orbiter:latest
#command: ["daemon", "--debug"]
environment:
DOCKER_HOST: "unix:///var/run/docker.sock"
ports:
- 8000
networks:
- public
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
restart_policy:
condition: on-failure
mode: replicated
replicas: 1
labels:
com.centurylinklabs.watchtower.enable: "true"
orbiter: "false"
traefik.enable: "true"
traefik.port: "8000"
traefik.docker.network: "public"
traefik.frontend.rule: "Host:scaler.${DOMAIN}"
traefik.frontend.priority: "10"
traefik.frontend.entryPoints: "http, https"
placement:
constraints: [node.role == manager]
agent:
image: portainer/agent:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- target: 9001
published: 9001
protocol: tcp
mode: host
environment:
AGENT_CLUSTER_ADDR: tasks.agent
networks:
- internal
deploy:
mode: global
restart_policy:
condition: on-failure
placement:
constraints: [node.role == manager]
labels:
com.centurylinklabs.watchtower.enable: "true"
orbiter: "false"
traefik.enable: "false"
traefik:
image: traefik:latest
command:
- "--logLevel=DEBUG"
- "--accesslog"
- "--api=true"
- "--api.entryPoint=traefik"
- "--api.dashboard=true"
- "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
#- "--entryPoints=Name:http Address::80"
- "--entryPoints=Name:https Address::443 TLS"
- "--defaultentrypoints=http,https"
- "--docker"
- "--docker.exposedbydefault=true"
- "--docker.swarmmode"
- "--docker.domain=${DOMAIN}"
- "--docker.watch=true"
- "--acme"
- "--acme.acmelogging=true"
- "--acme.domains=*.${DOMAIN}"
- "--acme.storage=/acme.json"
- "--acme.entryPoint=https"
- "--acme.onHostRule=true"
- "--acme.onDemand=false"
- "--acme.httpChallenge.entryPoint=http"
- "--acme.dnschallenge=true"
- "--acme.dnschallenge.provider=cloudflare"
- "--acme.tlsconfig=true"
environment:
CF_EMAIL: "[email protected]"
CF_API_KEY: "865a09eaf3a2819c36755fffa91b4b0129b63"
deploy:
placement:
constraints: [node.role==manager]
restart_policy:
condition: on-failure
labels:
traefik.enabled: "true"
traefik.port: "8080"
traefik.docker.network: "public"
traefik.frontend.rule: "Host:traefik.${DOMAIN}"
traefik.frontend.priority: "10"
traefik.frontend.entryPoints: "http, https"
traefik.frontend.headers.STSSeconds: "315360000"
traefik.frontend.headers.STSIncludeSubdomains: "true"
traefik.frontend.headers.STSPreload: "true"
traefik.frontend.headers.SSLRedirect: "false"
traefik.frontend.headers.SSLHost: "traefik.${DOMAIN}"
traefik.frontend.headers.frameDeny: "true"
traefik.frontend.headers.browseXSSFilter: "true"
traefik.frontend.passHostHeader: "true"
orbiter: "false"
ports:
- "80:80"
- "443:443"
- "8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
networks:
- public
networks:
public:
external:
name: public
internal:
external:
name: internal
...
# vim: set sts=2 sw=2 ts=2 et ai: