version: "{{ compose_version }}" services: traefik: image: traefik:v2.4 ports: - 80:80 - 443:443 volumes: - ./config/traefik.yaml:/etc/traefik/traefik.yaml - /var/run/docker.sock:/var/run/docker.sock deploy: placement: constraints: - node.role == manager networks: ['traefik']