-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.docker-compose.yml
59 lines (57 loc) · 2.54 KB
/
sample.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
services:
traefik:
image: traefik:${TF_VERSION}
restart: always
ports:
- '80:80'
- '443:443'
#- '8080:8080'
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_web_TRANSPORT_RESPONDINGTIMEOUTS_READTIMEOUT=300
- TRAEFIK_ENTRYPOINTS_websecure=true
- TRAEFIK_ENTRYPOINTS_websecure_ADDRESS=:443
- TRAEFIK_ENTRYPOINTS_websecure_TRANSPORT_RESPONDINGTIMEOUTS_READTIMEOUT=300
- 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_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME2}=true
#- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME2}_ACME_EMAIL=${TF_ACME_EMAIL}
#- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME2}_ACME_STORAGE=/etc/traefik/acme/acme_${TF_CERTRESOLVER_NAME2}.json
#- TRAEFIK_CERTIFICATESRESOLVERS_${TF_CERTRESOLVER_NAME2}_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_EXPOSEDBYDEFAULT=false
- TRAEFIK_PROVIDERS_FILE_DIRECTORY=/etc/traefik/files
- TRAEFIK_PROVIDERS_FILE_WATCH=true
# whoami:
# image: traefik/whoami
# networks:
# - webproxy
# labels:
# - traefik.enable=true
# - traefik.http.routers.whoami.entrypoints=web
# - traefik.http.routers.whoami.rule=Host(`whoami.mydomain.com`)
# - traefik.http.routers.whoami.middlewares=http2https@file
# - traefik.http.routers.whoami-sec.entrypoints=websecure
# - traefik.http.routers.whoami-sec.rule=Host(`whoami.mydomain.com`)
# - traefik.http.routers.whoami-sec.tls.certresolver=mydomain-com
# - traefik.http.routers.whoami-sec.middlewares=ratelimit@file,sts@file,security@file
networks:
webproxy:
external: true