[global]
checkNewVersion = false
sendAnonymousUsage = false
[entryPoints]
[entryPoints.websecure]
address = ":443"
[entryPoints.websecure.http]
tls = { }
[entryPoints.web]
address = ":80"
[entryPoints.web.http]
[entryPoints.web.http.redirections]
[entryPoints.web.http.redirections.entryPoint]
to = "websecure"
scheme = "https"
permanent = true
priority = 1
[log]
level = "DEBUG"
filePath = "./log/traefik.json"
format = "json"
maxSize = 100
maxAge = 30
[accessLog]
filePath = "./log/access.log"
format = "json"
bufferingSize = 100
[api]
dashboard = true
[providers]
[providers.file]
filename = "./dynamic/conf.toml"
watch = true
[providers.docker]
swarmMode = true
endpoint = "unix:///var/run/docker.sock"
exposedByDefault = false
network = "public_network"
watch = true
[certificatesResolvers.letsencryptresolver.acme]
email = "admin@test.com"
storage = "./letsencrypt/acme.json"
[certificatesResolvers.letsencryptresolver.acme.httpChallenge]
entryPoint = "web"
This is my Traefik configuration in version 2.11.2.
In my portainer stack I configured the following tags:
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=public_network'
- 'traefik.http.routers.portainer.rule=Host(`portainer.domain.com`)'
- 'traefik.http.routers.portainer.entrypoints=websecure'
- 'traefik.http.routers.portainer.priority=1'
- 'traefik.http.routers.portainer.tls.certresolver=letsencryptresolver'
- 'traefik.http.routers.portainer.service=portainer'
- 'traefik.http.services.portainer.loadbalancer.server.port=9000'
By running traffic inside a container with the aforementioned settings, you can access the perfect domain. But when I run the traefik binary, outside the container, with the same settings, I get Gateway time-out Error code 504 on the page.
But, I also enabled the file provider and the routers and services I configured in the file work perfectly, but the docker swarm one doesn't.
I imagine it's a network problem. I searched the logs but didn't find any errors.
Has anyone experienced this and have any ideas on how to resolve it?