I have no idea what the problem is
But I have a traefik.yml file which works perfectly on a normal docker-compose deployment with a network of Web. I can view my dashboard no problem with this deployment. As soon as I try to deploy this with the docker stack deploy command which uses an overlay network as default in a docker swarm environment it does not work at all. I get a 404 on the weboage end and I am also unable to route any of my other apps through it also because I also get a 404.
This is my config:
I've seen this subject a few times here on the forums and around Google and it seems no one really knows what the problem is with docker swarm and traefik.
Thanks for using Traefik and posting the question here.
Would you please refer to the example configuration for Docker Swarm: traefik-proxy/traefik-stack.yaml at master · jakubhajek/traefik-proxy · GitHub
Here is the link to the docs that refers to the configuration argument that needs to be added as CLI (referring to your example):
Hi, sorry to revive an old thread, but I'm trying to use the example configuration you linked to @jakubhajek but it doesn't seem to work on my swarm.
I can hit /ping and get an OK response, but /dashboard gives me a 404.
If I comment out the routing for /dashboard and /api I can hit the dashboard on :8080/dashboard.
It also fails to pick up the config for whoami.
The correct URL in order to visit the dashboard is
/dashboard/ - please mind the trailing slash in the URI. If the routing is correctly created you should get the dashboard in your browser.
Did you ever get this working? I too have a working config when using docker but after many days and many forums cannot get it working in swarm. I tried running the file from the github link above but can't get that working. Even that example has too many things going on and requires too many dns entries (wildcard won't work in my setup).