This commit is contained in:
Zengtudor 2024-10-17 11:20:29 +08:00
parent 97018ca824
commit 09d4e704df
2 changed files with 9 additions and 6 deletions

6
.env
View File

@ -2,4 +2,8 @@ hostname=gitlab.zziyu.cn
external_url=https://gitlab.zziyu.cn
email=Zengtudor@outlook.com
gitlab_root=/root/gitlab
mem_limit=2048m
# gitlab_root=C:\Users\Zengt\Documents\gitlab
mem_limit=2048m
http_port=3080
ssh_port=3022
shm_size=512mb

View File

@ -1,10 +1,10 @@
version: '2'
services:
gitlab:
image: 'twang2218/gitlab-ce-zh:11.1.4'
restart: unless-stopped
hostname: $hostname
mem_limit: $mem_limit
shm_size: $shm_size
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
@ -13,7 +13,7 @@ services:
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_rails['trusted_proxies'] = ['0.0.0.0']
# 需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。
# 比如下面的电子邮件的配置:
# gitlab_rails['smtp_enable'] = true
@ -26,9 +26,8 @@ services:
# gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = '$email'
ports:
- '3080:80'
- '3443:443'
- '3022:22'
- '$http_port:80'
- '$ssh_port:22'
volumes:
- $gitlab_root/config:/etc/gitlab
- $gitlab_root/data:/var/opt/gitlab