Easily deploy GitLab Community Edition and GitLab Runner using Docker Compose. This project is designed to be user-friendly and customizable, offering the following benefits:
- A preconfigured GitLab CE instance.
- A flexible GitLab Runner setup supporting Docker and shell executors.
- Easy configuration via a
.envfile. - Persistent data storage using Docker volumes.
- Quick deployment with a single command:
docker-compose up -d.
You must have Docker and Docker Compose installed and running on your system.
Ensure your system meets the following requirements:
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 4 GB | 8+ GB |
| CPU | 2 cores | 4+ cores |
| Storage | 20 GB | 50+ GB |
If you are using a firewall, ensure to allow traffic for these ports:
| Port | Purpose |
|---|---|
80 |
HTTP |
443 |
HTTPS |
22 |
SSH |
8443 |
GitLab Registry |
Before you begin, clone the repository and navigate to the project directory:
git clone https://github.com/Joel252/gitlab-config.git
cd gitlab-config/Now, follow the steps for both GitLab and Runner:
-
Navigate to the resource (
gitlaborrunner) directory. -
Create the
.envfile base on.env.examplefile and replace the values with your own settings. -
Use Docker Compose to build and start the container:
docker compose up -d
Verify the status of the services using
docker container ps. -
In the case of Gitlab, you access GitLab using the URL specified in
GITLAB_URLvariable. For example: https://git.example.com.For the Runner, go to the CI/CD section of the admin panel and verify that it has been successfully registered.
Note
The initial user is root, and the password is automatically generated. To obtain it, run: docker exec -it gitlab-ce grep 'Password:' /etc/gitlab/initial_root_password.
