共计 733 个字符,预计需要花费 2 分钟才能阅读完成。
官网参考地址
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!
正文完