Self-Hosted Docker Gitlab, CI and Pages

Over the past day or so I was trying to help a friend set up their Gitlab instance to host Gitlab Pages and publish content via Gitlab CI/CD. It turns out it’s not that straight forward so I thought I’d document setting up a self-hosted Gitlab CE using docker to do just this.

I’ll run both Gitlab and the runners that are used for the CI/CD processed in Docker containers, Docker is well supported by Gitlab and is generally the industry standard now for hosting services I have decided I’ll run Docker locally to test it out.

What I’m doing is a prototype server rather than a production ready one as there is so much to cover to create a robust and secure live service though I’ll note points to consider for a live environment as I come across them. I would however, spend much longer and much more time automating and hardening the solution for production.

Setting up (local)Host URLs Using dnsmasq

As I explore running Gitlab server and pages in Docker I’ll need some local host urls to use. I could just add rows into my /etc/hosts file for the host domains but I’d prefer a more elegant solution. I’m going to set up local DNS forwarding using dnsmasq so I can host Gitlab and Gitlab pages on my local machine. Gitlab will need 2 host domains, one to route to the main Gitlab UI and the second to route to the published Gitlab pages. Continue reading...


    
    
1 of 1