Hello, I am trying to get ANY stack to work with traefik and swarm mode. I have tried many different configurations and get no services or routers that appear in the dashboard.
I have tried many configs but here is one:
What am I doing wrong? I have tried it on both v2.0, v2.1 and different machines
Nothing shows up in the dashboard
version: "3.3"
services:
nginx:
image: nginxdemos/hello
ports:
- 5000:80
networks:
- mynet
labels:
- traefik.enable=true
- traefik.http.routers.nginx.service=my_service
- traefik.http.services.my_service.loadbalancer.server.port=80
- traefik.http.routers.nginx.rule=Host(`foo`)
deploy:
placement:
constraints:
- node.labels.leader==true
traefik:
image: traefik:v2.1
ports:
- 8080:8080
- 80:80
command: --api.insecure=true --providers.docker --providers.docker.swarmMode=true --providers.docker.network=mynet
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- mynet
deploy:
placement:
constraints:
- node.labels.leader==true
networks:
mynet:
external:
name: mynet
Thanks!