title: Traefik does not work with container deployed on worker node (swarm)
body: <p>I am running docker in swarm mode.</p>
  
  <p>Server A is my manager
  Server B is my worker</p>
  
  <p>I have a lot of containers running on A, and just start B to help with some of the workload.</p>
  
  <p>The problem is that if a container is deployed on A, Traefik will route requests to it, but if container ends up on B it will give me bad gateway.</p>
  
  <p>My <code>traefik</code> stack:</p>
  
  <pre><code>version: '3.6'
  
  networks:
    traefik-net:
      driver: overlay
      attachable: true
      external: true
  services:
    reverse-proxy:
      image: traefik # The official Traefik docker image
      command: --docker --docker.swarmmode --docker.domain=mydomain.com --docker.watch --api  # Enables the web UI and tells Traefik to listen to docker
      ports:
        - "80:80"     # The HTTP port
        - "8080:8080" # The Web UI (enabled by --api)
        - "443:443"
      networks:
        - traefik-net
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen 
        - /home/walucas/docker-configs/traefik/traefik.toml:/traefik.toml
        - /home/walucas/docker-configs/traefik/acme.json:/acme.json
      deploy:
        labels:
          traefik.port: 8080
          traefik.frontend.rule: "Host:traefik.mydomain.com"
          traefik.docker.network: traefik-net
        replicas: 1
        placement:
          constraints: [node.role == manager]
  </code></pre>
  
  <p>My <code>whoami</code> stack:</p>
  
  <pre><code>version: '3.6'
  
  services:
    whoami:
      image: jwilder/whoami
      ports:
        - "8089:8000"
      networks:
        - traefik-net
      deploy:
        replicas: 1
        labels:
          traefik.frontend.rule: "Host:whoami.mydomain.com"
          traefik.port: "8000"
          traefik.docker.network: traefik-net
  networks:
    traefik-net:
      driver: overlay
      attachable: true
      external: true
  </code></pre>
  
  <p>I am not sure if thats a network issue or a traefik issue.</p>
  
  <p>(note) Server B is on another physical location than server A.</p>