Compare commits

..

No commits in common. "503f438bdf3c3b918945f3a5d92025a4170dcd76" and "a40e9ad9ad64091d744c78edf8bb8fed04f4749b" have entirely different histories.

2 changed files with 3 additions and 12 deletions

View File

@ -36,21 +36,17 @@ services:
labels:
# expose Træfik using Træfik (dashboard)
- traefik.enable=${TRAEFIK_ENABLED}
# configure a global whitelist for accessing the Træfik dashboard
# configure a global whitelist for my home
- traefik.http.middlewares.dashboard-whitelist.ipwhitelist.sourcerange=${TRAEFIK_DASHBOARD_WHITELIST}
# configure a global middleware for redirecting HTTP to HTTPS
# configure the global redirect middleware
- traefik.http.middlewares.http-to-https.redirectscheme.scheme=https
- traefik.http.middlewares.http-to-https.redirectscheme.permanent=true
# configure a global middleware to harden security through HSTS
- traefik.http.middlewares.hsts.headers.stsSeconds=${TRAEFIK_STS_SECONDS}
- traefik.http.middlewares.hsts.headers.stsIncludeSubdomains=${TRAEFIK_STS_SUBDOMAINS}
- traefik.http.middlewares.hsts.headers.stsPreload=${TRAEFIK_STS_PRELOAD}
### Section HTTP
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
# only some people can access the dashboard, hence protect it with it's whitelist
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=dashboard-whitelist
# redirect Træfik dashboard to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https,hsts
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
- traefik.http.routers.http-${TRAEFIK_ROUTER}.service=api@internal
### Section HTTPS

View File

@ -8,12 +8,7 @@ TRAEFIK_NETWORK=traefik
TRAEFIK_MATCHRULE=traefik.mydomain.com
TRAEFIK_ROUTER=traefik_mydomain_com
TRAEFIK_PILOT_TOKEN=
# Security
TRAEFIK_TLSENABLED=true
TRAEFIK_STS_SECONDS=15552000
TRAEFIK_STS_SUBDOMAINS=true
TRAEFIK_STS_PRELOAD=true
# Certificate provider
TRAEFIK_DNSPROVIDER=hetzner