1、GitLab安装
修改gitlab 的docker-compose.yml以下注释位置
version: '2.3'
services:
redis:
restart: always
image: redis:5.0.9
command:
- --loglevel warning
volumes:
- /data/gitlab/redis-data:/var/lib/redis:Z #修改为对应路径
postgresql:
restart: always
image: sameersbn/postgresql:11-20200524
volumes:
- /data/gitlab/postgresql-data:/var/lib/postgresql:Z #修改为对应路径
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm,btree_gist
gitlab:
restart: always
image: sameersbn/gitlab:13.2.6
depends_on:
- redis
- postgresql
ports:
- "10080:80"
- "10022:22"
volumes:
- /data/gitlab/gitlab-data:/home/git/data:Z #修改为对应路径
healthcheck:
test: ["CMD", "/usr/local/sbin/healthcheck"]
interval: 5m
timeout: 10s
retries: 3
start_period: 5m
environment:
- DEBUG=false
- DB_ADAPTER=postgresql
- DB_HOST=postgresql
- DB_PORT=5432
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- REDIS_HOST=redis
- REDIS_PORT=6379
- TZ=Asia/Beijing
- GITLAB_TIMEZONE=Beijing
- GITLAB_HTTPS=false
- SSL_SELF_SIGNED=false
- GITLAB_HOST=localhost #修改为对应的IP或域名
- GITLAB_PORT=10080 #gitlab的访问端口,若80端口未被占用,可以设置为80
- GITLAB_SSH_PORT=10022
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alphanumeric-string
- GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alphanumeric-string
- GITLAB_SECRE