feat(Vaultwarden): Ajout d'une configuration de Traefik pour redirection automatique HTTP

This commit is contained in:
Simon 2024-08-01 15:34:58 +02:00
parent 342d7bfa58
commit 3f2a4b78fb
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
---
services:
vaultwarden:
labels:
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-vaultwarden}.tls.certResolver=letsencrypt
# redirect HTTP to HTTPS
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-vaultwarden}_http.rule=Host(`${VAULTWARDEN_DOMAIN:?err}`)
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-vaultwarden}_http.entrypoints=web
- traefik.http.middlewares.${TRAEFIK_ROUTER_NAME:-vaultwarden}_redirect_https.redirectscheme.scheme=https
- traefik.http.middlewares.${TRAEFIK_ROUTER_NAME:-vaultwarden}_redirect_https.redirectscheme.permanent=true
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-vaultwarden}_http.middlewares=${TRAEFIK_ROUTER_NAME:-vaultwarden}_redirect_https