zoukankan      html  css  js  c++  java
  • gitlab克隆地址修改为公网地址

    gitlab克隆地址是本地私有地址,计划调整为公网地址:

    由于没有买域名,故使用frp的端口来代理本地gitlab的web端口。

    1.更改gitlab.rb的external_url为公网地址

    grep ^external_url /mnt/gitlab/etc/gitlab.rb

    external_url 'http://47.103.xx.x'

    2. 更改如下host和port参数

    $ cat /mnt/gitlab/data/gitlab-rails/etc/gitlab.yml

      ## GitLab settings

      gitlab:

        ## Web server settings (note: host is the FQDN, do not include http://)

        host: 47.103.xx.x    #公网地址

        port: 20113         #这个是frp的映射地址

        https: false

    3.在frpc.ini的配置文件中,把地址映射出去

       [test-web]

       type = tcp

       local_ip = 127.0.0.1

       local_port = 20113

       remote_port = 20113

    4.启动docker的时候,全部使用映射地址。

    docker run -itd --name gitlab  -p 8443:443  -p 20113:80 -p 20112:22  --restart unless-stopped -v /mnt/gitlab/etc:/etc/gitlab -v /mnt/gitlab/log:/var/log/gitlab -v /mnt/gitlab/data:/var/opt/gitlab  beginor/gitlab-ce:11.0.1-ce.0

    5.登录gitlab查看Clone with HTTP的地址变为公网地址了。

    结束。

  • 相关阅读:
    Nexus OSS 3 搭建 Docker & Git LFS 仓库
    YARN FairScheduler
    k8s基本概念及使用
    k8s 基本使用
    10款非常实用的在线网站原型设计工具
    Spark常见问题及性能调优
    spark常见问题处理
    TensorFlow 基本使用
    c语言数组的操作
    在Android开发中遇到的MediaPlayer问题
  • 原文地址:https://www.cnblogs.com/liusingbon/p/13164308.html
Copyright © 2011-2022 走看看