From fe78ebbe9edc2a6d5330bab6b309e8e3cd1578e3 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Wed, 16 Oct 2024 18:07:42 +0800 Subject: [PATCH] update --- .env | 10 ++++----- docker-compose.yml | 55 ++++++++++++++++++++++++---------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/.env b/.env index 450daf1..cf3fe31 100644 --- a/.env +++ b/.env @@ -1,6 +1,4 @@ -GITLAB_HOSTNAME=gitlab.zziyu.cn -GITLAB_ROOT_PASSWORD=123456 -POSTGRES_PASSWORD=123456 -POSTGRES_USER=123456 -GITLAB_HOME=/root/gitlab/data -# EXTERN_URL=https://gitlab.zziyu.cn +hostname=gitlab.zziyu.cn +external_url=https://gitlab.zziyu.cn +email=Zengtudor@outlook.com +gitlab_root=/root/gitlab \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d8ef77d..f5e4aa5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,27 +1,30 @@ -version: '3.6' +version: '2' services: - gitlab: - image: alpinelinux/gitlab:17.3 - container_name: minigitlab - restart: always - hostname: '$SERVER_HOST' - environment: - - GITLAB_HOSTNAME=$GITLAB_HOSTNAME - - GITLAB_ROOT_PASSWORD=$GITLAB_ROOT_PASSWORD - - POSTGRES_PASSWORD=$POSTGRES_PASSWORD - - POSTGRES_USER=$POSTGRES_USER - - TZ=Asia/Shanghai - # GITLAB_OMNIBUS_CONFIG: | - # Add any other gitlab.rb configuration here, each on its own line - # external_url '$EXTERN_URL' - - ports: - - '3080:80' - - '3443:443' - - '3022:22' - volumes: - - '$GITLAB_HOME/config:/etc/gitlab' - - '$GITLAB_HOME/logs:/var/log/gitlab' - - '$GITLAB_HOME/data:/var/opt/gitlab' - shm_size: '256m' - mem_limit: '4096m' + gitlab: + image: 'twang2218/gitlab-ce-zh:11.1.4' + restart: unless-stopped + hostname: $hostname + environment: + TZ: 'Asia/Shanghai' + GITLAB_OMNIBUS_CONFIG: | + external_url $external_url + gitlab_rails['time_zone'] = 'Asia/Shanghai' + # 需要配置到 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