天天看點

Gitlab建立的項目改成實際伺服器ip位址方法

[root@sannian eatjoys-front-min]# docker ps
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS                    PORTS                                   NAMES
db3aa2741c94        twang2218/gitlab-ce-zh   "/assets/wrapper"   24 minutes ago      Up 24 minutes (healthy)   22/tcp, 443/tcp, 0.0.0.0:9999->80/tcp   gitlab
           

先進入容器

[root@sannian eatjoys-front-min]# docker exec -it db3aa2741c94  /bin/bash
root@db3aa2741c94:/# find / -name gitlab.yml
/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
           

編輯配置檔案

root@db3aa2741c94:/# vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml           
production: &base
  #
  # 1. GitLab app settings
  # ==========================

  ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: 47.99.145.156
    port: 80
    https: false
           

修改host 為實際 ip

重新開機

root@db3aa2741c94:/# gitlab-ctl restart
           

然後進入web

Gitlab建立的項目改成實際伺服器ip位址方法

完成