Version control with Gitlab

It's more than just version control !
Let's deloy a self hosted gitlab instance with docker, to take advantage of itd features.
Fire up a VM and make sure the necessary resources are allocated : 4GB RAM 2 vCores.
Make sure u have docker installed, and the daemon up and runnning, then run the following :

docker run -d -p 22:22 -p 80:80 -p 443:443  \
    --name gitlab \
    --hostname \
    --restart unless-stopped \
    --shm-size 256m \
    -v gitlab_config:/etc/gitlab \
    -v gitlab_logs:/var/log/gitlab \
    -v gitlab_data:/var/opt/gitlab \
    gitlab/gitlab-ce:$VERSION \

Port 22 will be alredy occupied on your host, the fastest solution is to change ssh port.
Shortly gitlab will be up and running, we can visit at the URL provided, make sure it resolves !
You will notice https is not working, let's fix it...
Most of the configuration is held into a file named gitlab.rb.
After ensuring port 80 is open at firewall level, we can have gitlab generate a cert with let'sencrypt.

external_url ""        
letsencrypt['contact_emails'] = ['[email protected]'] 

Gitlab supports LDAP integration, we can configure it here as well :

Run the following command to apply the new configuration.

gitlab-ctl reconfifure


Subscribe to our Newsletter