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:
version: "3.3"
services:
traefik:
image: traefik:v2.0
restart: always
container_name: traefik
ports:
- "80:80"
- "8080:8080"
- "443:443"
command:
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
- --log.level=DEBUG
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.file.filename=/dynamic.yaml
- --providers.docker.network=web
- --entrypoints.web.address=:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./dynamic.yaml:/dynamic.yaml
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`monitor.domain.com`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=api-auth"
- "traefik.http.middlewares.api-auth.basicauth.users=admin:$$apr1$$idpFqhJJ$$8SdVdLF0B9k6CcVux2cKF."
networks:
web:
external: true
Any ideas?