I am trying to run gitlab docker image 14.6.3 with custom ports for HTTP (60000) HTTPS (60001) and SSH (60002).
For this, I created the folder /srv/gitlabNB/
and started the instance like so:
sudo docker run --detach \
--hostname gitlab.testdomain.de \
--publish 60000:60000 --publish 60001:60001 --publish 60002:60002 \
--name gitlabNB \
--restart always \
--volume /srv/gitlabNB/config:/etc/gitlab \
--volume /srv/gitlabNB/logs:/var/log/gitlab \
--volume /srv/gitlabNB/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
I let it configure itself and did following changes in /srv/gitlabNB/config/gitlab.rb
Set external_url "https://gitlab.testdomain.de:60000"
Set gitlab_rails['gitlab_shell_ssh_port'] = 60002
Set nginx['listen_port'] = 60000
UFW (since I'm using Ubuntu as host) allows Ports 60000-60002 for TCP from anywhere
Ran gitlab-ctl reconfigure
. Chef runs successfully
gitlab-ctl status
results in:
run: alertmanager: (pid 310) 686s; run: log: (pid 308) 686s
run: gitaly: (pid 316) 686s; run: log: (pid 307) 686s
run: gitlab-exporter: (pid 325) 686s; run: log: (pid 322) 686s
run: gitlab-workhorse: (pid 312) 686s; run: log: (pid 309) 686s
run: grafana: (pid 321) 686s; run: log: (pid 306) 686s
run: logrotate: (pid 339) 686s; run: log: (pid 336) 686s
run: nginx: (pid 300) 686s; run: log: (pid 298) 686s
run: postgres-exporter: (pid 318) 686s; run: log: (pid 317) 686s
run: postgresql: (pid 299) 686s; run: log: (pid 297) 686s
run: prometheus: (pid 303) 686s; run: log: (pid 301) 686s
run: puma: (pid 315) 686s; run: log: (pid 314) 686s
run: redis: (pid 324) 686s; run: log: (pid 320) 686s
run: redis-exporter: (pid 313) 686s; run: log: (pid 305) 686s
run: sidekiq: (pid 304) 686s; run: log: (pid 302) 686s
run: sshd: (pid 30) 707s; run: log: (pid 29) 707s
So everything should be up and running, yet, when I try to access gitlab.testdomain.de:60001 or gitlab.testdomain.de:60000 Firefox prompts “Server not reachable”.
In a previous run of gitlab-ctl reconfigure
I got a bunch of the following errors, yet they dont seem to be in the last reconfigure run:
==> /var/log/gitlab/sidekiq/current <==
{"severity":"ERROR","time":"2022-01-28T13:00:17.933Z","message":"Error fetching job: Error connecting to Redis on /var/opt/gitlab/redis/redis.socket (Errno::ENOENT)"}
Did I miss something / did I micsonfigure something in my setup?
I’ve seen this forum post (https://forum.gitlab.com/t/running-gitlab-docker-on-custom-ports/7811) and tried to do what they did, yet it didnt work.