Docker 部署GitLab

Docker部署GitLab

部署环境

  • centos7
  • docker

部署脚本

配置文件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
posted @ 2020-08-27 20:02  GMGood007  阅读(191)  评论(0)    收藏  举报