I can get traefik 2.2 to work just fine in NON swarm mode. Once I turn that on it all goes to crap. I have made so many changes that I have to start over. So the first step is to get traefik 2.2 to run in a swarm stack and access the dashboard via monitor.fe.net not the port of 8080. That works just fine specifying the port. I think this is all related to docker swarm and labels etc. So any help would be appreciated.
version: "3.0"
services:
traefik:
image: traefik:v2.2
ports:
- "80:80"
# - "8081:8080" # traefik dashboard
- "443:443"
command:
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
- --log.level=DEBUG
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=traefik-public
- --entrypoints.web.address=:80
- --entrypoints.web-secured.address=:443
# - --entrypoints.traefik.address=:8081
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik-public
deploy:
placement:
constraints:
- node.role == manager
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entrypoints=web"
- "traefik.http.routers.api.rule=Host(`monitor.fe.net`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=secretstuff"
networks:
traefik-public:
external: true