gitlab的docker compose文件示例
发布于 5 个月前·
1 人看过
version: '3.6'
services:
web:
image: 'gitlab/gitlab-ce:latest' # 默认最新镜像,亦可指定版本
container_name: gitlab
restart: unless-stopped
privileged: true
hostname: 'gitlab'
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.1.166' #项 本机IP地址
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
ports:
- '80:80' #默认80 自定义主机端口时需不同修改external_url
- '443:443'
- '2222:22'
volumes:
- '/data/gitlab/config:/etc/gitlab'
- '/data/gitlab/data:/var/opt/gitlab'
- '/data/gitlab/logs:/var/log/gitlab'