git clone git@github.com:rboonzaijer/gitlab-docker.git
cd gitlab-docker
Create the .env file, and use your OWN data
cp .env.example .env
Make each '{file}.sh' file executable
chmod +x *.sh
docker compose up -d
Now wait until the container status is 'healty' (might take about 4 minutes on an i7)
You can keep checking the status with:
docker ps --filter "name=gitlab"
When you see (healthy) in the status column, then Gitlab is running: http://localhost:30000 user=root, pass=(see .env file)
Notice the warning "Anyone can register for an account.", you can run the post_setup now to automatically disable this (optional, this can also be done in the UI).
You will get a test-mail when it's completed (or an error if you did not change the 'test_email_to', of misconfigured your smtp settings). Note: the default user gets an email to confirm its account!
Note: if you change your .env file, run docker compose up -d
to recreate the container, then wait until the container is 'healthy' again ( docker ps --filter "name=gitlab"
)
./post_setup.sh
After this command: refresh the UI and the warning is gone. Also, you've got a mail if SMTP was properly configured.
Hint (optional): You can also do any manual changes directly in the gitlab-rails console with: docker exec -it gitlab gitlab-rails console
We want to backup the data in the volumes. These files will be created:
- backup_gitlab_config.tar
- backup_gitlab_logs.tar
- backup_gitlab_data.tar
- backup_gitlab_lfs.tar
This will shut down the container, create backups from the volumes, and then run the container again:
./volumes_backup.sh ./../my_backup_dir/
This will shut down the container, restore (overwrite!) the backup files into the volumes, and start the container again.
./volumes_restore.sh ./../my_backup_dir/
docker compose pull
docker compose up -d --remove-orphans
You might want to remove old images, show all images with docker images
To remove an old unused image:
docker rmi gitlab/gitlab-ee:15.5.3-ee.0
./gitlab_runners_create.sh
./gitlab_runners_register.sh