-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
52 lines (50 loc) · 2.07 KB
/
compose.yaml
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
services:
traefik:
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=web
- --providers.file.directory=/etc/traefik
- --providers.file.watch=true
- --entrypoints.web.address=:${HTTP_PORT}
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:${HTTPS_PORT}
- --entrypoints.websecure.http.middlewares=default@file
- --entrypoints.websecure.http.tls.domains=${DEFAULT_DOMAIN}
- --entrypoints.websecure.http.tls.options=default@file
- --certificatesresolvers.myresolver.acme.dnschallenge=${ACME_DNS_CHALLENGE}
- --certificatesresolvers.myresolver.acme.dnschallenge.provider=${ACME_DNS_CHALLENGE_PROVIDER}
- --certificatesresolvers.myresolver.acme.httpchallenge=${ACME_HTTP_CHALLENGE}
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.myresolver.acme.tlschallenge=${ACME_TLS_CHALLENGE}
- --certificatesresolvers.myresolver.acme.email=${ACME_EMAIL}
- --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
# Enable API
#- --api
#- --api.insecure=true
# Optionally uncomment the following lines if you want to test/debug:
#- --log.level=DEBUG
#- --certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
# Controls whether the server's certificate chain and host name is verified
#- --serverstransport.insecureskipverify=true
# To enable the Prometheus metrics
#- --metrics.prometheus=true
image: traefik:${VERSION}
networks:
- web
ports:
- ${HTTP_PORT}:${HTTP_PORT}
- ${HTTPS_PORT}:${HTTPS_PORT}
# Enable API
#- 8080:8080
restart: always
volumes:
- ./config:/etc/traefik:ro
- letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
web:
external: true
volumes:
letsencrypt: