Gitlab Wont Work with Traefik via Docker-Compose?

So I am trying to run Gitlab behind Traefik since Traefik helps me route the other containers.

Just for reference, this is Gitlabs documentation on docker-compose: https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose

When I start my Traefik Dashboard, this is what i get: https://i.imgur.com/W75h7f4.png - Notice that Gitlab is not up (yet)

I noticed at times that it sometimes it appears on my Dashboard. So okay, it takes awhile, no problem right?

Well, when I try visiting it, i get this: https://i.imgur.com/oCIAPVK.png

So it seems to be connecting but Gitlab is not playing nice.

This is my YAML script: https://pastebin.com/kqPx483j

Notice how environment is commented out. I tried uncommenting it and running it with the settings like this: https://pastebin.com/aBXh09Z3 - But i get this error when I try: https://pastebin.com/9iwynxhw

This is my Traefik TOML: https://pastebin.com/eBzBvK9X

The question is simple: Why is Gitlab not working?

I’m new to GitLab and this forum as well so this might not help a lot.
But just to prepare the path for others:
How did you pin down Traefik as source of this problem? Have you tried the setup without Traefik?
Which OS are you using?
Have you tried any other way to confirm that gitlab is running?
If you are on the system that is running gitlab try gitlab-ctl status or systemctl | grep gitlab.
If you are on the system that is running docker try docker ps --all to list all running docker containers.
If your container is running access it with:

Regarding your test with the environment variable:
you can post code like this so links won’t get outdated

test@dockertest:~/build-file$ docker-compose pull && docker-compose up
ERROR: yaml.scanner.ScannerError: while scanning a simple key
  in "./docker-compose.yml", line 58, column 13
could not find expected ':'
  in "./docker-compose.yml", line 59, column 13
test@dockertest:~/build-file$

Are you sure that the environment tag is what you want?
If yes, what happens in line 58?
Can you post the whole docker-compose.yml with line numbers?

Hi there, I am using Ubuntu 16.04 LTS with Docker version: 18.03.1-ce, build 9ee9f40 and Docker-Compose version: 1.21.2, build a133471

As for the error posted in terms of the YAML file, I was able to fix it by doing some correct indents, like this: https://pastebin.com/BZbx6aaK

The thing is, this did not solve the problem. I posted the same problem at https://www.reddit.com/r/docker/comments/8mwuf8/gitlab_wont_work_with_traefik/ and it seems that Gitlab is not good at reporting its health so im advised to disable it?

Im not sure what the main culprit is.

Good thing! One error at a time :wink:

Regarding your most current error output on reddit: https://pastebin.com/raw/zmH2Gy6U

  • Try reading /var/log/gitlab/nginx/error.log and /var/log/gitlab/nginx/current in your docker container.
  • See what /var/opt/gitlab/nginx/conf/gitlab-http.conf:86 actually contains in line 86.

As you can see these are just general debugging tips as I seem to be on the same level. But there seem to be some competent people on reddit. Maybe I’ll post my question over there.

In any case, good luck! :slight_smile: