{"id":20693128,"url":"https://github.com/jeshan/gitlab-on-compose","last_synced_at":"2025-04-22T17:42:25.817Z","repository":{"id":77853635,"uuid":"98792354","full_name":"jeshan/gitlab-on-compose","owner":"jeshan","description":"An easy way to setup gitlab and gitlab runners using Docker Compose","archived":false,"fork":false,"pushed_at":"2017-08-06T20:31:44.000Z","size":9,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T23:48:12.521Z","etag":null,"topics":["docker-compose","gitlab-ci","gitlab-runner"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeshan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-30T11:14:44.000Z","updated_at":"2022-09-23T11:09:30.000Z","dependencies_parsed_at":"2023-05-02T07:46:34.191Z","dependency_job_id":null,"html_url":"https://github.com/jeshan/gitlab-on-compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeshan%2Fgitlab-on-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeshan%2Fgitlab-on-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeshan%2Fgitlab-on-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeshan%2Fgitlab-on-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeshan","download_url":"https://codeload.github.com/jeshan/gitlab-on-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250289169,"owners_count":21405928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","gitlab-ci","gitlab-runner"],"created_at":"2024-11-16T23:25:28.313Z","updated_at":"2025-04-22T17:42:25.811Z","avatar_url":"https://github.com/jeshan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Gitlab-on-compose\nA painless way to setup gitlab and gitlab docker runners using Docker Compose.\n\n# Usage\n- `docker-compose up`\n- usual gitlab setup for project at endpoint http://localhost:1000\n- Find your runner registration token ($REGISTRATION_TOKEN) at `http://GITLAB_HOST/$PROJECT_GROUP/$PROJECT_NAME/settings/ci_cd`\n- Register each runner by running the following in each of their containers: `gitlab-runner register -n -r $REGISTRATION_TOKEN -u http://gitlab --executor docker --docker-image docker:latest --docker-network-mode gitlaboncompose_default --docker-privileged`\n\n\n## Script\nThe script to be run will be something like:\n````\nREGISTRATION_TOKEN=FILL_ME_IN\ndocker exec -it gitlaboncompose_gitlab-runner1_1 gitlab-runner register -n -r $REGISTRATION_TOKEN -u http://gitlab --executor docker --docker-image docker:latest --docker-network-mode gitlaboncompose_default  --docker-volumes \"/var/run/docker.sock:/var/run/docker.sock\"\ndocker exec -it gitlaboncompose_gitlab-runner2_1 gitlab-runner register -n -r $REGISTRATION_TOKEN -u http://gitlab --executor docker --docker-image docker:latest --docker-network-mode gitlaboncompose_default  --docker-volumes \"/var/run/docker.sock:/var/run/docker.sock\"\ndocker exec -it gitlaboncompose_gitlab-runner3_1 gitlab-runner register -n -r $REGISTRATION_TOKEN -u http://gitlab --executor docker --docker-image docker:latest --docker-network-mode gitlaboncompose_default  --docker-volumes \"/var/run/docker.sock:/var/run/docker.sock\"\n````\n\n# Gitlab Registry\nTo enable the Docker Registry, define the `registry_external_url` to be `'http://localhost:4567'` \nin `/etc/gitlab/gitlab.rb` in the gitlab container. \n\nMap the IP of the gitlab container to the `gitlab` host in your /etc/hosts file. Obtain it with the \nfollowing command:\n\n`docker inspect --format '{{.NetworkSettings.Networks.gitlaboncompose_default.IPAddress}}' gitlaboncompose_gitlab_1`\n\n## Notes:\n- need the explicit `gitlab` hostname in compose.\n- since the gitlab container is on a bridge network, the IP may change and you'll have to modify your hosts file again. If you don't want this, you may try running gitlab with network_mode=host.\n\n## TODOs:\n- add example on how to use a real domain\n- setup a secure registry\n\n# Notes\n- Current Gitlab version used is 9.4.1. To change gitlab (and runner) version, edit the VERSION variable in `.env`\n- runners bound to host socket because they need to be able to at least pull images\n- the runners are also given access to the host socket when registered so that they may run builds. This is a workaround for a current limitation. See [#1986](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1986).\n\n# Licence\nReleased under the simplified BSD licence.\nCopyright 2017. Jeshan G. BABOOA\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeshan%2Fgitlab-on-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeshan%2Fgitlab-on-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeshan%2Fgitlab-on-compose/lists"}