-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.https.yaml
76 lines (72 loc) · 2.53 KB
/
docker-compose.https.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.7'
services:
traefik:
image: traefik:v2.7
container_name: traefik
restart: always
ports:
- 80:80
- 443:443
- 8080:8080
networks:
- web
- default
#network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "${VOLUMES}/letsencrypt/config:/letsencrypt"
- "${VOLUMES}/letsencrypt/certs:/etc/certs"
healthcheck:
test: ['CMD', 'traefik', 'healthcheck', '--ping']
command:
- "--ping"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--log.level=debug"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=web"
#- "--entrypoints.web.address=:80"
- "--entrypoints.web.address=:8000"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le.acme.email=${ACME_EMAIL}"
#- "--certificatesresolvers.le.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
# - --docker.endpoint=unix:///var/run/docker.sock
# - --docker.domain=${DOMAIN}
# - --docker.watch=true
# - --docker.exposedbydefault=false
# - --debug=false
# - --logLevel=ERROR
# - --defaultentrypoints=https,http
# - --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
# - --entryPoints=Name:https Address::443 TLS
# - --retry
# - --acme.email=${ACME_EMAIL}
# - --acme.storage=/letsencrypt/acme.json
# - --acme.entryPoint=https
# - --acme.onHostRule=true
# - --acme.httpchallenge.entrypoint=http
#labels:
# - "traefik.http.routers.to-https.rule=HostRegexp(`{host:.+}`)"
# - "traefik.http.routers.to-https.entrypoints=http"
# - "traefik.http.routers.to-https.middlewares=to-https"
# - "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
#whoami:
# image: "traefik/whoami"
# container_name: "whoami"
# networks:
# - web
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
# - "traefik.http.routers.whoami.entrypoints=websecure"
# - "traefik.http.routers.whoami.tls.certresolver=le"
# - "traefik.http.routers.whoami.tls=true"
networks:
web:
driver: bridge
name: web