When I run traefik containerized, it correctly forwards traffic to my Docker containers and sets up routing just fine based on the labels. However, recently I've needed to route to processes running on the host system, and I thought that hoisting Traefik to run on the host system as well would be the easiest solution, and that turning on the docker provider should just "keep working". However, when I visit routes in a browser or use curl, I get 404s.
Does Traefik support routing to multiple providers?: processes on the host and Docker containers?
Thanks in advance.
accessLog: true entryPoints: web: address: ":80" web-secure: address: ":443" certificatesResolvers: letsencrypt: acme: email: MY_EMAIL storage: /opt/traefik/data/traefik-acme.json httpChallenge: entryPoint: web providers: docker: network: traefik watch: true file: filename: /etc/traefik/dynamic_config.yaml # currently an empty file until I can get the Docker routing working watch: true
Ansible docker_container spec:
- name: Start Jellyfin community.general.docker_container: name: jellyfin image: jellyfin/jellyfin restart_policy: unless-stopped container_default_behavior: no_defaults labels: traefik.enable: "true" traefik.docker.network: traefik traefik.http.services.jellyfin-web.loadbalancer.server.port: "8096" # Middlewares: traefik.http.middlewares.jellyfin-redirect-tls.redirectscheme.scheme: "https" traefik.http.middlewares.jellyfin-redirect-tls.redirectscheme.permanent: "true" # HTTP: traefik.http.routers.jellyfin-web.rule: "Host(`example.com`)" traefik.http.routers.jellyfin-web.middlewares: "jellyfin-redirect-tls" traefik.http.routers.jellyfin-web.entrypoints: "web" # HTTPS: traefik.http.routers.jellyfin-web-secure.rule: "Host(`example.com`)" traefik.http.routers.jellyfin-web-secure.tls: "true" traefik.http.routers.jellyfin-web-secure.tls.certresolver: "letsencrypt" traefik.http.routers.jellyfin-web-secure.entrypoints: "web-secure" networks: - name: traefik volumes: - ...SNIP...