deploy gitlab through docker

use docker

export GITLAB_HOME=/vol2/gitlab2/apollo

docker run --detach \
  --hostname HOSTNAME \
  --publish 11000:443 --publish 11001:80 --publish 11002:22 \
  --name apollo \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab \
  --volume $GITLAB_HOME/logs:/var/log/gitlab \
  --volume $GITLAB_HOME/data:/var/opt/gitlab \
  --shm-size 256m \
  gitlab/gitlab-ee:latest

use docker-compose

vim docker-compose.yml

version: '3.6'

services:
  web:
    image: gitlab/gitlab-ee
    container_name: gitlab
    restart: always
    hostname: 192.168.242.66  # Change to your domain or IP
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://192.168.242.66:11000'  # Change to your domain or IP
        letsencrypt['enable'] = false
    network_mode: bridge  # Set network mode to bridge
    ports:
      - "11000:80"      # HTTP
      - "11001:443"    # HTTPS
      - "11002:22"      # SSH
    volumes:
      - gitlab-config:/vol2/gitlab2/config
      - gitlab-log:/vol2/gitlab2/log
      - gitlab-data:/vol2/gitlab2/data
    tmpfs:
      - /vol2/gitlab2/shm:size=2g
volumes:
  gitlab-config:
  gitlab-log:
  gitlab-data:

docker-compose up -d
note:
	i succeed in docker
		but don't in docker-compose

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-22 01:10:01       169 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-22 01:10:01       185 阅读
  3. 在Django里面运行非项目文件

    2024-07-22 01:10:01       155 阅读
  4. Python语言-面向对象

    2024-07-22 01:10:01       169 阅读

热门阅读

  1. 嵌入式软件技术能力

    2024-07-22 01:10:01       33 阅读
  2. Mad MAD Sum-Codeforces Round 960 (Div. 2)

    2024-07-22 01:10:01       40 阅读
  3. js | Core

    js | Core

    2024-07-22 01:10:01      29 阅读
  4. 堆、栈和队列(数据结构)

    2024-07-22 01:10:01       43 阅读
  5. 关于Spring Boot IOC&DC,看这一篇就够了

    2024-07-22 01:10:01       36 阅读
  6. 关于数据库索引

    2024-07-22 01:10:01       38 阅读
  7. 【Node.js基础04】node.js模块化

    2024-07-22 01:10:01       35 阅读
  8. Postman实战案例:从零开始设计API测试流程

    2024-07-22 01:10:01       39 阅读
  9. linux文本查看命令

    2024-07-22 01:10:01       30 阅读
  10. 基于深度学习的医学影像分类

    2024-07-22 01:10:01       38 阅读