跳至主要內容

gitlab部署

brinishness...小于 1 分钟GitlabDockerdockergitlabdocker-compose

gitlab部署

使用docker-compose部署gitlab

1.安装docker并配置docker-compose 查看使用方式

2.创建gitlab目录

mkdir -p /data/env/gitlab

3.创建gitlab配置目录

mkdir -p /home/env/gitlab/config

3.映射目录配置 (附配置文件)

version: "3.6"
services:
  gitlab:
    image: gitlab/gitlab-ee:15.8.3-ee.0
    container_name: gitlab
    user: root
    privileged: true
    restart: always
    hostname: gitlab.brinishness.eu.org
    volumes:
      - /etc/localtime:/etc/localtime
      - /home/env/gitlab/config:/etc/gitlab
      - /home/env/gitlab/config/.license_encryption_key.pub:/opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub
      - /data/env/gitlab/logs:/var/log/gitlab
    ports:
      - "7580:7580"
      - "7522:7522"
      - "7550:7550"
      - "7505:7505"
      - "7508:80"
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://xxx.xxx.xxx:7580'
        registry_external_url 'http://xxx.xxx.xxx:7550'
        gitlab_rails['gitlab_shell_ssh_port'] = 7522

4.启动gitlab

docker-compose up -d

5.访问gitlab

http://ip:7580
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v2.15.5