关于gitlab:docker-gitlab部署配置参考

官网参考地址

docker-compose.yml

version: "3.9"
services:
  gitlab:
    image: gitlab/gitlab-ee:15.7.3-ee.0
    ports:
      - "28022:22"
      - "28080:80"
      - "28443:443"
    volumes:
      - ../data:/var/opt/gitlab
      - ../logs:/var/log/gitlab
      - ../config:/etc/gitlab
    shm_size: '256m'
    environment:
      GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
    configs:
      - source: gitlab
        target: /omnibus_config.rb
    secrets:
      - gitlab_root_password
  gitlab-runner:
    image: gitlab/gitlab-runner:alpine3.14-bleeding
    deploy:
      mode: replicated
      replicas: 4
configs:
  gitlab:
    file: ./gitlab.rb
secrets:
  gitlab_root_password:
    file: ./root_password.txt

gitlab.rb

external_url 'https://gitlab.ueic.tech/'
gitlab_rails['initial_root_password'] = File.read('/run/secrets/gitlab_root_password').gsub("\n", "")

root_password.txt

MySuperSecretAndSecurePassw0rd!

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理