2024-10-16 08:23:18 +00:00
|
|
|
services:
|
2024-10-16 10:07:42 +00:00
|
|
|
gitlab:
|
|
|
|
image: 'twang2218/gitlab-ce-zh:11.1.4'
|
|
|
|
restart: unless-stopped
|
|
|
|
hostname: $hostname
|
2024-10-16 15:01:01 +00:00
|
|
|
mem_limit: $mem_limit
|
2024-10-17 03:20:29 +00:00
|
|
|
shm_size: $shm_size
|
2024-10-16 10:07:42 +00:00
|
|
|
environment:
|
|
|
|
TZ: 'Asia/Shanghai'
|
|
|
|
GITLAB_OMNIBUS_CONFIG: |
|
2024-10-16 14:18:35 +00:00
|
|
|
external_url '$external_url'
|
2024-10-16 10:07:42 +00:00
|
|
|
gitlab_rails['time_zone'] = 'Asia/Shanghai'
|
2024-10-16 14:32:52 +00:00
|
|
|
nginx['enable'] = false
|
|
|
|
gitlab_workhorse['listen_network'] = "tcp"
|
|
|
|
gitlab_workhorse['listen_addr'] = "0.0.0.0:80"
|
2024-10-17 03:20:29 +00:00
|
|
|
gitlab_rails['trusted_proxies'] = ['0.0.0.0']
|
2024-10-16 10:07:42 +00:00
|
|
|
# 需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。
|
|
|
|
# 比如下面的电子邮件的配置:
|
|
|
|
# gitlab_rails['smtp_enable'] = true
|
|
|
|
# gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
|
|
|
|
# gitlab_rails['smtp_port'] = 465
|
|
|
|
# gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
|
|
|
|
# gitlab_rails['smtp_password'] = "password"
|
|
|
|
# gitlab_rails['smtp_authentication'] = "login"
|
|
|
|
# gitlab_rails['smtp_enable_starttls_auto'] = true
|
|
|
|
# gitlab_rails['smtp_tls'] = true
|
2024-10-16 14:18:35 +00:00
|
|
|
gitlab_rails['gitlab_email_from'] = '$email'
|
2024-10-16 10:07:42 +00:00
|
|
|
ports:
|
2024-10-17 03:20:29 +00:00
|
|
|
- '$http_port:80'
|
|
|
|
- '$ssh_port:22'
|
2024-10-16 10:07:42 +00:00
|
|
|
volumes:
|
|
|
|
- $gitlab_root/config:/etc/gitlab
|
|
|
|
- $gitlab_root/data:/var/opt/gitlab
|
2024-10-16 13:03:11 +00:00
|
|
|
- $gitlab_root/logs:/var/log/gitlab
|