tweetysat
tweetysat

Reputation: 2403

Gitlab Community running on docker - Heathcheck

I have a docker container running gitlab community edition.

It's working fine except that the container remains unhealthty

The problem comes from the /opt/gitlab/etc/gitlab-healthcheck-rc file. It contains url='http://localhost:80/gitlab/help' and should be url='http://myhostname:80/gitlab/help'

If I change it, it's working. But each time there is a gitlab-ctl reconfigure, it turns back to localhost

Indeed, in the log I can see

  * template[/opt/gitlab/etc/gitlab-healthcheck-rc] action create
    - update content in file /opt/gitlab/etc/gitlab-healthcheck-rc from 1e4e16 to 1a5b11

But where is localhost coming from ? Is there a way to start the container with the right value ?

I treid adding a hostname: myhostname in the docker-compose.yml but it's not working.

Upvotes: 0

Views: 252

Answers (1)

Jakub Bujny
Jakub Bujny

Reputation: 4628

You can change that probably in /opt/gitlab/embedded/cookbooks/gitlab/recipes/gitlab-healthcheck.rb as if nginx is enabled it seems that localhost is hardcoded

if node['gitlab']['nginx']['enable']
  ...
  host = "localhost:#{node['gitlab']['nginx']['listen_port']}"
end

Upvotes: 1

Related Questions