Continuing the discussion from How to disable http redirect to https for a single container domain?
Hello everybody!
I got 13 services, and all are https except two.
My initial setup did a https redirection on each needed container, but redirected everything, though not globally redirected.
Then found related link, where priority is used and tryed, but even whoami example copyed/pasted from linked page takes https redirection :_(
My "docker-compose.yml" is:
traefik:
image: traefik
container_name: traefik
depends_on:
- dnsmasq
networks:
- traefik_network
ports:
- 8080:8080
- 443:443
command:
- "--log.level=DEBUG"
- '--api'
- '--providers.docker.exposedByDefault=false'
- '--entrypoints.web.address=:80'
- '--entrypoints.websecure.address=:443'
- '--entrypoints.websecure.http.tls=true'
- '--certificatesresolvers.mydnschallenge.acme.dnschallenge'
- '--certificatesresolvers.mydnschallenge.acme.dnschallenge.provider=duckdns'
- '--certificatesresolvers.mydnschallenge.acme.email=admin@none.com'
- '--certificatesresolvers.mydnschallenge.acme.storage=/letsencrypt/acme.json'
environment:
- TZ=${TZ}
- DUCKDNS_TOKEN=${DUCKDNS_TOKEN}
volumes:
- './letsencrypt:/letsencrypt'
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.traefik.rule=Host(`traefik.piset.local`)'
- 'traefik.http.routers.traefik.entrypoints=websecure'
- 'traefik.http.routers.traefik.service=api@internal'
- 'traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)'
- 'traefik.http.routers.http-catchall.entrypoints=web'
- 'traefik.http.routers.http-catchall.middlewares=redirect-to-https'
- 'traefik.http.routers.http-catchall.priority=1000'
- 'traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https'
whoami:
image: containous/whoami
ports:
- 7777:80
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.aaa.rule=Host(`toto.localhost`)'
- 'traefik.http.routers.aaa.entrypoints=web'
- 'traefik.http.routers.aaa.priority=2000'
Any help would be appreciated.
Thanks in advance!