部署环境
部署脚本
配置文件docker-compose.yml
version: ‘3‘
services:
web:
# 镜像名称
image: ‘twang2218/gitlab-ce-zh‘
# 容器名字 docker run --name
container_name: gitlab
# 开机自动重启
restart: always
# 服务器IP地址 FQDN
hostname: ‘192.168.2.144‘
environment:
TZ: ‘Asia/Shanghai‘
GITLAB_OMNIBUS_CONFIG: |
external_url ‘http://192.168.2.144‘
gitlab_rails[‘gitlab_shell_ssh_port‘] = 2222
unicorn[‘port‘] = 8888
nginx[‘listen_port‘] = 80
ports:
- ‘80:80‘
- ‘443:443‘
- ‘2222:22‘
volumes:
- ./config:/etc/gitlab
- ./data:/var/opt/gitlab
- ./logs:/var/log/gitlab
运行配置文件
docker-compose up -d
原文:https://www.cnblogs.com/gmgood007/p/13573578.html