Update docker-compose.yml to Traefik v3.1

This commit is contained in:
bluepuma77
2024-10-22 11:49:12 +02:00
committed by GitHub
parent b14e3b09f5
commit 77b3c7a0e5

View File

@@ -1,8 +1,6 @@
version: '3.9'
services:
traefik:
image: traefik:v3.0
image: traefik:v3.1
ports:
- 80:80
- 443:443
@@ -38,14 +36,15 @@ services:
- traefik.http.middlewares.myauth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/
whoami:
image: traefik/whoami:v1.8
image: traefik/whoami:v1.10
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.mywhoami.rule=Host(`whoami.example.com`) || Host(`www.whoami.example.com`)
- traefik.http.services.mywhoami.loadbalancer.server.port=80
# next lines are optional to redirect www to non-www
- traefik.http.middlewares.mywwwredirect.redirectregex.regex=^https://www\.(.*)
- traefik.http.middlewares.mywwwredirect.redirectregex.replacement=https://$${1}
- traefik.http.routers.mywhoami.middlewares=mywwwredirect