Taiga behind Reverse Proxy (Traefik)

201 views
Skip to first unread message

Sh11ft

unread,
May 24, 2021, 2:39:03 PMMay 24
to taigaio

Hello,

I have configured Taiga using the documentation from the official github repo.
I have gotten as far as creating the first superuser, however I receive a
502 bad gateway error when logging in (specifically when it hits the backend / API).

I know this is almost certainly because of my Traefik configuration and not Taiga, but I'm at a loss for how to continue. I would appreciate if anyone has any suggestions!

docker-compose.yml: https://pastebin.com/1bRczEHh

I'm not sure exactly which other files would be helpful to share, but I can share other files on request.

Sh11ft

unread,
May 27, 2021, 1:02:45 PMMay 27
to taigaio
 For a little more context, this is the exact connection error from the taiga-gateway docker logs:

2021/05/27 16:53:45 [error] 32#32: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.22.0.2, server: _, request: "POST /api/v1/auth HTTP/1.1", upstream: "http://172.19.0.8:8000/api/v1/auth", host: "pm.<redacted>.net", referrer: "https://pm.<redacted>.net/login?next=%252Fdiscover"

Some additional things I've tried:
  • Playing with the server_name in the taiga-gateway config file - tried localhost, pm.<redacted>.net, taiga-gateway, _, and simply leaving the field out entirely. None of these had any change.
  • Updated to the latest docker + docker-compose and reinstalled Taiga, with no change.
  • Put each taiga container on a "taiga" network and only the "taiga-gateway" on two networks ("taiga" and "web", my standard docker-compose network)
  • Set each taiga container to the "web" network and removed the "taiga" network

Sh11ft

unread,
May 27, 2021, 7:18:13 PMMay 27
to taigaio
Alright, well, I finally got it to work. For anyone else that might end up stumbling across this:

  1. in the taiga-gateway/taiga.conf file - the server_name must be the name of your traefik container.
  2. taiga doesn't like the network to be named anything other than "taiga". Instead of replacing with my proxy network, I ended up mapping the external network to the name "taiga" for the taiga containers.
Unrelated, but I also experienced taiga-back and taiga-gateway crashing on startup the first time they are run. This was because taiga-db wasn't starting fast enough. Once taiga-db finished starting I restarted taiga-back and let it run its migrations. Once those were complete, I restarted taiga-gateway and ran the createsuperuser command.

Seems like everything is working now.

Florian Neuhaus

unread,
Nov 2, 2021, 9:43:32 AMNov 2
to taigaio
Hi Sh11ft

I'm planning a similar setup. Right now we are using dockertaiga and want to move to the official repo.
Your pastebin isn't working anymore. Is there a change you can post the final docker-compose.yml?

That would help a lot :)

Thanks and greetings,
Florian
Reply all
Reply to author
Forward
0 new messages