docker 安装 gitlab

3-13 722 views

命令安装

启动命令
docker run --detach \
  --hostname 127.0.0.1 \
  --publish 8181:8181 \
  --name gitlab \
  --restart always \
  --volume /apps/docker/gitlab/config:/etc/gitlab \
  --volume /apps/docker/gitlab/logs:/var/log/gitlab \
  --volume /apps/docker/gitlab/data:/var/opt/gitlab \
  gitlab/gitlab-ce:latest

docker compose 方式

#docker-compose.yml
gitlab:
    image: 'gitlab/gitlab-ce:latest'
    container_name: gitlab
    environment:
    GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://git.blackmatch.cn'
        # email setting
        gitlab_rails['smtp_enable'] = true
        gitlab_rails['smtp_address'] = "smtp.gmail.com"
        gitlab_rails['smtp_port'] = 587
        gitlab_rails['smtp_user_name'] = "my.email@gmail.com"
        gitlab_rails['smtp_password'] = "my-gmail-password"
        gitlab_rails['smtp_domain'] = "smtp.gmail.com"
        gitlab_rails['smtp_authentication'] = "login"
        gitlab_rails['smtp_enable_starttls_auto'] = true
        gitlab_rails['smtp_tls'] = false
        gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
    ports:
      - '8181:8181'
    volumes:
      - './config:/etc/gitlab'
      - './logs:/var/log/gitlab'
      - './data:/var/opt/gitlab'
    restart: always

Linux使用lsyncd实现2个文件夹实时同步

官方文档: https://axkibe.github.io/lsyncd/download/ 1.安装 $ yum install lsyncd $ yum install rsync $ yum install libtermcap-devel ncurses-devel l...

阅读全文

firewall 防火墙常用命令

查看版本 $ firewall-cmd --version 0.4.3.3 help $ firewall-cmd --help 状态 $ firewall-cmd --state running 重载配置 $ firewall-cmd --reload 重新加载...

阅读全文

修改linux centos系统默认时区

方法一 先安装ntpdate: yum install -y ntpdate 再选择一个时间服务器来更新时间: ntpdate time.windows.com 恢复系统时间为utc时间 ln -sf /usr/share/zo...

阅读全文

欢迎留言