This commit is contained in:
Zengtudor 2024-10-16 18:07:42 +08:00
parent c5b21446f0
commit fe78ebbe9e
2 changed files with 33 additions and 32 deletions

10
.env
View File

@ -1,6 +1,4 @@
GITLAB_HOSTNAME=gitlab.zziyu.cn hostname=gitlab.zziyu.cn
GITLAB_ROOT_PASSWORD=123456 external_url=https://gitlab.zziyu.cn
POSTGRES_PASSWORD=123456 email=Zengtudor@outlook.com
POSTGRES_USER=123456 gitlab_root=/root/gitlab
GITLAB_HOME=/root/gitlab/data
# EXTERN_URL=https://gitlab.zziyu.cn

View File

@ -1,27 +1,30 @@
version: '3.6' version: '2'
services: services:
gitlab: gitlab:
image: alpinelinux/gitlab:17.3 image: 'twang2218/gitlab-ce-zh:11.1.4'
container_name: minigitlab restart: unless-stopped
restart: always hostname: $hostname
hostname: '$SERVER_HOST' environment:
environment: TZ: 'Asia/Shanghai'
- GITLAB_HOSTNAME=$GITLAB_HOSTNAME GITLAB_OMNIBUS_CONFIG: |
- GITLAB_ROOT_PASSWORD=$GITLAB_ROOT_PASSWORD external_url $external_url
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD gitlab_rails['time_zone'] = 'Asia/Shanghai'
- POSTGRES_USER=$POSTGRES_USER # 需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。
- TZ=Asia/Shanghai # 比如下面的电子邮件的配置:
# GITLAB_OMNIBUS_CONFIG: | # gitlab_rails['smtp_enable'] = true
# Add any other gitlab.rb configuration here, each on its own line # gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
# external_url '$EXTERN_URL' # gitlab_rails['smtp_port'] = 465
# gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
ports: # gitlab_rails['smtp_password'] = "password"
- '3080:80' # gitlab_rails['smtp_authentication'] = "login"
- '3443:443' # gitlab_rails['smtp_enable_starttls_auto'] = true
- '3022:22' # gitlab_rails['smtp_tls'] = true
volumes: gitlab_rails['gitlab_email_from'] = $email
- '$GITLAB_HOME/config:/etc/gitlab' ports:
- '$GITLAB_HOME/logs:/var/log/gitlab' - '3080:80'
- '$GITLAB_HOME/data:/var/opt/gitlab' - '3443:443'
shm_size: '256m' - '3022:22'
mem_limit: '4096m' volumes:
- $gitlab_root/config:/etc/gitlab
- $gitlab_root/data:/var/opt/gitlab
- $gitlab_root/logs:/var/log/gitlab