version: "3.8" services: #https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose #https://github.com/sameersbn/docker-gitlab/blob/master/docker-compose.yml gitlab: image: gitlab/gitlab-ce:13.12.0-ce.0 restart: always privileged: true hostname: gitlab environment: TZ: ${TZ} GITLAB_ROOT_PASSWORD: aA123456! GITLAB_OMNIBUS_CONFIG: | external_url 'http://${IP}:${PORT}' nginx['listen_port'] = ${PORT} gitlab_rails['time_zone'] = 'Asia/Shanghai' ports: - ${PORT}:${PORT} # - 9443:443 # - 9022:22 volumes: - ./data/gitlab/etc:/etc/gitlab - ./data/gitlab/log:/var/log/gitlab - ./data/gitlab/opt:/var/opt/gitlab #https://docs.gitlab.com/runner/register/index.html#docker #http://localhost:9080/admin/runners #gitlab-runner register #docker:20.10.6 #https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-docker-executor-with-the-docker-image-docker-in-docker gitlab-runner: image: gitlab/gitlab-runner:alpine-v13.12.0 restart: always privileged: true environment: TZ: ${TZ} volumes: #- /var/run/docker.sock:/var/run/docker.sock - ${DOCKER_SOCK}:/var/run/docker.sock - ./data/gitlab-runner:/etc/gitlab-runner depends_on: - gitlab