-
Notifications
You must be signed in to change notification settings - Fork 2
/
stack.yml
47 lines (45 loc) · 1.28 KB
/
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
version: "3"
services:
traefik:
image: traefik:v2.2.0
command:
- "--log=true"
- "--log.level=WARNING"
- "--api=true"
- "--api.debug=true"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.swarmmode=true"
- "--providers.docker.swarmmoderefreshseconds=10"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.watch=true"
- "--providers.docker.network=traefik"
- "--entrypoints.web.address=:80"
- "--metrics.prometheus=true"
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik"
mode: global
restart_policy:
condition: on-failure
update_config:
parallelism: 1
delay: 10s
placement:
constraints:
- node.role == manager
networks:
traefik:
external: true