安装
安装中文版稳定版twang2218/gitlab-ce-zh:10.5
,docker-compose.yml
配置文件如下:
version: '3'
services:
web:
image: 'twang2218/gitlab-ce-zh:10.5'
container_name: gitlab-web
restart: always
hostname: '192.168.1.102'
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
unicorn['port'] = 8888
unicorn['worker_timeout'] = 60
unicorn['worker_processes'] = 5
unicorn['worker_memory_limit_min'] = "200 * 1 << 20"
unicorn['worker_memory_limit_max'] = "300 * 1 << 20"
# 减少数据库缓存大小 默认256,可适当改小
postgresql['shared_buffers'] = "256MB"
# 减少数据库并发数
postgresql['max_worker_processes'] = 8
# 减少sidekiq并发数
sidekiq['concurrency'] = 10
external_url 'http://192.168.1.102:8080'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
nginx['listen_port'] = 8080
ports:
- '8080:8080'
- '8443:443'
- '2222:22'
volumes:
- /srv/dev-disk-by-id-ata-HITACHI_HUA723030ALA640_YHJL158A-part1/appdata/gitlab/config:/etc/gitlab
- /srv/dev-disk-by-id-ata-HITACHI_HUA723030ALA640_YHJL158A-part1/appdata/gitlab/data:/var/opt/gitlab
- /srv/dev-disk-by-id-ata-HITACHI_HUA723030ALA640_YHJL158A-part1/appdata/gitlab/logs:/var/log/gitlab