forked from tbowmo/docker-swarm-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraefik.yml
60 lines (58 loc) · 1.5 KB
/
traefik.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
version: '3.5'
services:
traefik:
image: traefik:v1.7
command: >
--docker
--docker.swarmmode
--docker.watch
--docker.exposedbydefault=false
--docker.domain=${BASE_HOST}
--docker.network='traefik-public'
--entrypoints='Name:http Address::80 Redirect.EntryPoint:https'
--entrypoints='Name:https Address::443 TLS'
--acme
--acme.storage="acme.json"
--acme.email=${ACME_EMAIL}
--acme.entryPoint=https
--acme.httpChallenge.entryPoint=http
--acme.onhostrule=true
--acme.acmelogging=true
--accessLog
--api
--logLevel="DEBUG"
--insecureSkipVerify=true
deploy:
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
placement:
constraints:
- node.role == manager
- node.labels.mysensors == yes
labels:
- traefik.docker.network=traefik-public
- traefik.enable=true
- traefik.frontend.rule=Host:traefik.${BASE_HOST}
- traefik.port=8080
- traefik.frontend.whiteList.sourceRange=${ALLOW_LAN}
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
- 8383:8080
networks:
- traefik-public
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /docker/traefik/acme.json:/acme.json
networks:
traefik-public:
external: true