From 09d4e704df07c119466ca704d5f97c819577ffd5 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 17 Oct 2024 11:20:29 +0800 Subject: [PATCH] update --- .env | 6 +++++- docker-compose.yml | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 5bc4792..077b707 100644 --- a/.env +++ b/.env @@ -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 \ No newline at end of file +# gitlab_root=C:\Users\Zengt\Documents\gitlab +mem_limit=2048m +http_port=3080 +ssh_port=3022 +shm_size=512mb \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 79fe065..a01bd4e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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