gitlab-docker-compose/docker-compose.yml
2024-10-16 23:01:01 +08:00

35 lines
1.4 KiB
YAML

version: '2'
services:
gitlab:
image: 'twang2218/gitlab-ce-zh:11.1.4'
restart: unless-stopped
hostname: $hostname
mem_limit: $mem_limit
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
external_url '$external_url'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
nginx['enable'] = false
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "0.0.0.0:80"
gitlab_rails['trusted_proxies'] = ['127.0.0.1']
# 需要配置到 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
gitlab_rails['gitlab_email_from'] = '$email'
ports:
- '3080:80'
- '3443:443'
- '3022:22'
volumes:
- $gitlab_root/config:/etc/gitlab
- $gitlab_root/data:/var/opt/gitlab
- $gitlab_root/logs:/var/log/gitlab