GitLab is a web-based Git repository manager that provides powerful code management, CI/CD, and many other features. This tutorial will guide you through installing GitLab on the latest version of Fedora CoreOS.
GitLab is installed in a Docker container, so you will need to install Docker on your machine. You can install Docker by running the following command:
sudo systemctl enable docker && sudo systemctl start docker
First, you'll need to create a docker-compose.yml file. Run the following command to create and open the file in your preferred text editor:
sudo touch docker-compose.yml && sudo nano docker-compose.yml
Then, paste in the following contents into the file:
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
restart: always
The above docker-compose.yml
file specifies using the latest version of the GitLab Docker image, and binds ports 80, 443, and 22 of your machine to the corresponding ports of the GitLab container. It also creates three volumes to store GitLab's configuration, logs, and data, which will persist between container restarts.
Next, edit the /srv/gitlab/config/gitlab.rb
file to customize your GitLab installation. You can make changes using the nano
editor:
sudo nano /srv/gitlab/config/gitlab.rb
Some common customizations include:
external_url 'https://gitlab.example.com'
notification_email 'notifications@example.com'
gitlab_rails['incoming_email_enabled'] = true
If you want to make any other customizations to your GitLab instance, visit GitLab's official documentation for instructions on how to make changes to the gitlab.rb
configuration file.
Once you've customized your GitLab installation, start it using the following command:
sudo docker-compose up -d
This command runs GitLab in detached mode, meaning it will continue to run even if you close your terminal window.
When GitLab is running, you can access it in your web browser using your domain name or subdomain name that points to your machine's IP address. For example, if your domain name is gitlab.example.com
, navigate to https://gitlab.example.com
in your web browser.
Congratulations! You've successfully installed GitLab on Fedora CoreOS. You can now use GitLab to manage your code, create CI/CD pipelines, and much more.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!