Challenges of self hosted Gitlab with docker compose and Cloudflare
SSH ports
Self hosted Gitlab normally uses port 22 for SSH access. When running docker this is not ideal as its usually used by the server. Its best to map it to another port. The Gitlab docs provides an example of using port 2224.
Gitlab Web UI booted up great! But I could not clone or push to the repos using port 2224. First this port is blocked by my organisations firewall. Using online tools I checked if it was accessible outside of our network. Nada!
We proxy our traffic using Cloudflare. To get it working, I used one of the allowed non-caching ports. This allows me to have my Web UI proxied but still have access to SSH for git cloning. There are other options available.
Server specs
I used a cloud server and initially set the specs too low. Ensure to check the minimum server requirements before selecting your specs.
Boot time
Although docker compose reports that the container is running as soon as you issue the docker compose up -d
command, it takes a while for Gitlab to initiate. Check the logs and give it a few minutes before visiting the Gitlab Web UI
# command to check logs
docker compose logs -f web
Initial reactions
Its amazing that this is a free product. It appears to be a clone of Gitlab itself offering the same UI as Free Gitlab SaaS and also sends email alerts (once confirmed) to notify when logging in from a diffeent location or adding SSH keys.
Comments
Post a Comment