1 min read
Traefik Gateway Time Out With Docker Compose

One common mistake I keep making when configuring new docker-compose services for access via traefik results in Gateway Timeout. I'll explain why this happens.

If you've configured traefik correctly with labels, you will be able to see the traefik router and traefik service to be configured correctly in the dashboard, without any errors. This means that once traffic hits traefik, it is being handled correctly, and when traefik is routing traffic to your docker service, it is unable to reach it. The most likely reason for this is that you have not configured a network path between traefik and the docker service you're trying to expose. This can be corrected simply by adding the correct networks in the docker-compose file and making sure the service is explicitly connected to that network.