Add TLS
This commit is contained in:
parent
67fbe4b609
commit
a7c99b7595
@ -2,18 +2,15 @@ services:
|
|||||||
traefik:
|
traefik:
|
||||||
image: "traefik:v3.3"
|
image: "traefik:v3.3"
|
||||||
container_name: "traefik"
|
container_name: "traefik"
|
||||||
command:
|
|
||||||
#- "--log.level=DEBUG"
|
|
||||||
- "--api.insecure=true"
|
|
||||||
- "--providers.docker=true"
|
|
||||||
- "--providers.docker.exposedbydefault=false"
|
|
||||||
- "--entryPoints.web.address=:80"
|
|
||||||
ports:
|
ports:
|
||||||
- "8081:80"
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
- "./:/etc/traefik/"
|
- "./:/etc/traefik/"
|
||||||
|
environment:
|
||||||
|
- "HETZNER_API_KEY=ZsVxcGY7xFLGadVmvxaSJObHocdcm3Gm"
|
||||||
|
|
||||||
whoami:
|
whoami:
|
||||||
image: "traefik/whoami"
|
image: "traefik/whoami"
|
||||||
@ -21,4 +18,10 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.whoami.rule=Host(`whoami.strolap.com`)"
|
- "traefik.http.routers.whoami.rule=Host(`whoami.strolap.com`)"
|
||||||
- "traefik.http.routers.whoami.entrypoints=web"
|
- "traefik.http.routers.whoami.entrypoints=web,websecure"
|
||||||
|
- "traefik.http.routers.whoami-secure.rule=Host(`whoami.strolap.com`)"
|
||||||
|
- "traefik.http.routers.whoami-secure.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.whoami-secure.tls=true"
|
||||||
|
- "traefik.http.routers.whoami-secure.tls.certresolver=myresolver"
|
||||||
|
- "traefik.http.routers.whoami-secure.tls.domains[0].main=strolap.com"
|
||||||
|
- "traefik.http.routers.whoami-secure.tls.domains[0].sans=*.strolap.com"
|
||||||
20
traefik.yaml
20
traefik.yaml
@ -0,0 +1,20 @@
|
|||||||
|
api:
|
||||||
|
insecure: true
|
||||||
|
|
||||||
|
entryPoints:
|
||||||
|
web:
|
||||||
|
address: ":80"
|
||||||
|
websecure:
|
||||||
|
address: ":443"
|
||||||
|
|
||||||
|
providers:
|
||||||
|
docker:
|
||||||
|
exposedByDefault: false
|
||||||
|
|
||||||
|
certificatesResolvers:
|
||||||
|
myresolver:
|
||||||
|
acme:
|
||||||
|
email: timlappe@proton.me
|
||||||
|
storage: /etc/traefik/acme.json
|
||||||
|
dnsChallenge:
|
||||||
|
provider: hetzner
|
||||||
Loading…
x
Reference in New Issue
Block a user