Hi guys!
Currently running Gitlab in Docker, as I migrated from source (finally! )
However, I am running into some issues.
First some things about my configuration. I am running Gitlab behind a reverse proxy. This reverse proxy takes care of LetsEncrypt certificates, so I had to change the config/gitlab.rb
file a bit to get this working. I changes these values:
external_url 'https://my-gitlab-domain.tld'
nginx['listen_port'] = 80
nginx['listen_https'] = false
Gitlab works pretty good behind the reverse proxy. Gitlab CI works also fine with this config.
Now, I would like to get the integrated Grafana working. In Settings → Metrics and profiling → Metrics - Grafana I enabled Grafana and went to the url. I clicked the “Sign in with Gitlab” button, and eventually I get to this Grafana error page ( message shown: (login.OAuthLogin(NewTransportWithCode)")
I digged through the logs and I found the following line:
lvl=eror msg=login.OAuthLogin(NewTransportWithCode) logger=context userId=0 orgId=0 uname= error="Post https://my-gitlab-domain.tld/oauth/token: dial tcp 172.17.0.2:443: connect: connection refused"
Now, it seems that Grafana tries to connect with the SSL version of the API (which is good - by default). This does not work in my setup, because in /etc/hosts
there is the ‘my-gitlab-domain.tld’ mapped to 172.17.0.2. And Gitlab is not listening on port 443, so Grafana cannot connect.
I tried to edit the ‘data/grafana/grafana.ini’ file, and set the following values to non-https:
auth_url
token_url
api_url
I saved the file and restarted the container with docker-compose down && docker-compose up. Unfortunately, the values have been overwritten.
My question being: is there any way to get this working in my setup?
Thank you in advance.