I'm using Traefik and Docker (in Swarm mode) and I recently managed to add HTTPS support (yeah I'm a newbie) but I can see in the logs that something is not right.
I have the following docker-compose.yml
:
version: "3.8"
services:
traefik:
image: traefik:v2.4
ports:
- "80:80"
- "443:443"
- "8080:8080"
command:
- --log.level=DEBUG
- --api.insecure=true
- --api.dashboard=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.swarmmode=true
- --providers.docker.network=<STACK_NAME>_traefik-net
- --entrypoints.websecure.address=:443
- --certificatesresolvers.resolver.acme.dnschallenge=true
- --certificatesresolvers.resolver.acme.dnschallenge.provider=lightsail
- --certificatesresolvers.resolver.acme.email=<MY_EMAIL>
- --certificatesresolvers.resolver.acme.storage=/opt/traefik/acme.json
networks:
- traefik-net
deploy:
placement:
constraints:
- node.role == manager
http-server:
image: <MY_IMAGE>
networks:
- traefik-net
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.traefik.entrypoints=websecure
- "traefik.http.routers.traefik.rule=Host(<MY_HOST>) && Path(`/token`)"
- traefik.http.routers.traefik.service=http-service
- traefik.http.services.http-service.loadbalancer.server.port=4443
- traefik.http.services.http-service.loadbalancer.server.scheme=http
depends_on:
- reverse-proxy
networks:
traefik-net:
and I get this log appearing multiple time consecutivetly:
time="2021-06-28T09:44:29Z" level=debug msg="Filtering disabled container" providerName=docker container=<STACK_NAME>-traefik-q54qcpuxqohxtvb5ogcipxn9f
time="2021-06-28T09:44:29Z" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"traefik\":{\"entryPoints\":[\"websecure\"],\"service\":\"http-service\",\"rule\":\"Host(<MY_HOST>) \\u0026\\u0026 Path(`/token`)\"}},\"services\":{\"http-service\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.166.6:4443\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
time="2021-06-28T09:44:29Z" level=info msg="Skipping same configuration" providerName=docker
Furthermore, I cannot access the /token
route and I receive a 404 error. So here are my questions:
- Is my container's configuration get registered multiple time? is it normal?
- Is there anything obvious (that I can see) that leads to the 404 error ? is it linked to the previous question ?