services: traefik: image: {{ traefik_image }} restart: unless-stopped env_file: .env {% if traefik_publish_entrypoints %} ports: - "{{ traefik_bind_address }}:{{ traefik_http_port }}:{{ traefik_http_port }}" - "{{ traefik_bind_address }}:{{ traefik_https_port }}:{{ traefik_https_port }}" {% if traefik_dashboard_enabled %} - "{{ traefik_bind_address }}:{{ traefik_dashboard_port }}:{{ traefik_dashboard_port }}" {% endif %} {% endif %} volumes: {% if traefik_docker_provider_enabled | bool %} - /var/run/docker.sock:/var/run/docker.sock:ro {% endif %} - ./traefik.yml:/etc/traefik/traefik.yml:ro {% if traefik_file_provider_enabled | bool %} - ./dynamic:/etc/traefik/dynamic:ro {% endif %} - ./data:/data networks: - {{ traefik_network }} networks: {{ traefik_network }}: external: true