Gitea behind Traefik on Docker


I’ve been having a very difficult time trying to get Traefik to play nicely with an instance of Gitea that is on port 3000.

Enclosed is my configuration, where I have two routers, gitea_site (HTTP) and gitea_site_secured (HTTPS). HTTP is automatically redirected to HTTPS i.e. gitea_site redirects to gitea_site_secured with some middleware.

I am unable to make the link between gitea_site_secured router and somehow forwarding that onto port 3000 of the Gitea instance. I get a gateway timeout error within Traefik when navigating to

After reading the documentation, it appears I have to define a service and load balancer.

I have done this in line 40 + 41 but it did not work (tried many combinations).

Any help or pointers in the right direction would be appreciated.

docker-compose.yml configratuon:

Thank you.