美文网首页
docker-compose安装gitlab

docker-compose安装gitlab

作者: 0neBean | 来源:发表于2019-11-14 01:10 被阅读0次

    vim docker-compose.yml

    http访问安装:

    web:
      image: 'gitlab/gitlab-ee:latest'
      restart: always
      hostname: 'gitlab.example.com'
      environment:
        GITLAB_OMNIBUS_CONFIG: |
          external_url 'http://gitlab.example.com:8929'
          gitlab_rails['gitlab_shell_ssh_port'] = 2224
      ports:
        - '8929:8929'
        - '2224:22'
      volumes:
        - '$GITLAB_HOME/config:/etc/gitlab'
        - '$GITLAB_HOME/logs:/var/log/gitlab'
        - '$GITLAB_HOME/data:/var/opt/gitlab'
    

    https访问安装:

    web:
      image: 'gitlab/gitlab-ee:latest'
      restart: always
      hostname: 'gitlab.example.com'
      environment:
        GITLAB_OMNIBUS_CONFIG: |
          external_url 'https://gitlab.example.com'
          # Add any other gitlab.rb configuration here, each on its own line
      ports:
        - '80:80'
        - '443:443'
        - '22:22'
      volumes:
        - '$GITLAB_HOME/config:/etc/gitlab'
        - '$GITLAB_HOME/logs:/var/log/gitlab'
        - '$GITLAB_HOME/data:/var/opt/gitlab'
    
    #创建临时目录并导出目录变量
    mkdir -p /usr/program/gitlab && export GITLAB_HOME=/usr/program/gitlab
    docker-compose up -d
    

    相关文章

      网友评论

          本文标题:docker-compose安装gitlab

          本文链接:https://www.haomeiwen.com/subject/rjdlictx.html