This commit is contained in:
godd0t 2023-05-10 20:27:05 +02:00
parent 35064ba355
commit 578e1da4e9

View File

@ -88,39 +88,37 @@ services:
image: traefik:v2.5
container_name: "${APP_NAME}-traefik"
command:
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.watch=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--api.dashboard=true"
- "--certificatesresolvers.myResolver.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.myResolver.acme.storage=/myResolver/acme.json"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=ovh"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.myresolver.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--log.level=DEBUG"
- "--accesslog=true"
- "--tracing=true"
- "--api=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`${TRAEFIK_DOMAIN}`) && (PathPrefix(`/`)"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certresolver=myResolver"
- "traefik.http.routers.dashboard.tls.certresolver=myresolver"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=user:$$2y$$05$$22TlNvU.X30m4rVd3aIA3.jF/XXkh6eayHg5UYwDNgF8MVFwJgPrS"
- "traefik.http.routers.${APP_NAME}-nginx.tls=true"
- "traefik.http.routers.${APP_NAME}-nginx.tls.certresolver=myResolver"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./myResolver:/myResolver"
- "./letsencrypt:/letsencrypt"
volumes:
static_files: