-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (62 loc) · 2.27 KB
/
docker-compose.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
version: '3.8'
services:
traefik:
image: traefik:${TF_VERSION}
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
#- target: 8080
# published: 8080
# mode: host
networks:
- webproxy
volumes:
- ${TF_HOME:-.}/config/acme:/etc/traefik/acme
- ${TF_HOME:-.}/config/files:/etc/traefik/files:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- TRAEFIK_GLOBAL_CHECKNEWVERSION=false
- TRAEFIK_GLOBAL_SENDANONYMOUSUSAGE=false
- TRAEFIK_ENTRYPOINTS_web=true
- TRAEFIK_ENTRYPOINTS_web_ADDRESS=:80
- TRAEFIK_ENTRYPOINTS_websecure=true
- TRAEFIK_ENTRYPOINTS_websecure_ADDRESS=:443
- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME1}=true
- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME1}_ACME_EMAIL=${TF_ACME_EMAIL}
- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME1}_ACME_STORAGE=/etc/traefik/acme/acme_${TF_CERTRESOLVER_NAME1}.json
- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME1}_ACME_HTTPCHALLENGE_ENTRYPOINT=web
- TRAEFIK_LOG=true
- TRAEFIK_API=false
- TRAEFIK_API_DASHBOARD=true
- TRAEFIK_API_INSECURE=false
- TRAEFIK_PING=false
- TRAEFIK_PROVIDERS_DOCKER=true
- TRAEFIK_PROVIDERS_DOCKER_WATCH=true
- TRAEFIK_PROVIDERS_DOCKER_SWARMMODE=true
- TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT=false
- TRAEFIK_PROVIDERS_FILE_DIRECTORY=/etc/traefik/files
- TRAEFIK_PROVIDERS_FILE_WATCH=true
deploy:
mode: global
whoami:
image: traefik/whoami
networks:
- webproxy
deploy:
labels:
- traefik.enable=true
- traefik.http.services.whoami.loadbalancer.server.port=80
- traefik.http.routers.whoami.entrypoints=web
- traefik.http.routers.whoami.rule=Host(`hostname.dyndns.org`)
- traefik.http.routers.whoami.middlewares=http2https@file
- traefik.http.routers.whoami-sec.entrypoints=websecure
- traefik.http.routers.whoami-sec.rule=Host(`hostname.dyndns.org`)
- traefik.http.routers.whoami-sec.tls.certresolver=dyndns-org
- traefik.http.routers.whoami-sec.middlewares=sts@file,security@file
networks:
webproxy:
external: true