GitLab 部署踩坑记
2021年01月14日 技术分享>服务运维 docker, 服务本站文章除注明转载外,均为原创文章。如需转载请注明出处:
https://kwokronny.top/202101/docker-gitlab/

这篇文章主要水在于我直接安装配置完gitlab后,遇到的几个迷之问题与找到的解决方案。
环境介绍
服务器版本:ubuntu server 18.04.3 (Win10 虚拟机)
Docker 版本:19.03.8
gitlab 版本:13.5.4
gitlab小部分跳转链接url端口错误
因隐秘需求,未分配80端口给gitlab服务,可视化配置的过程中修改了访问url,导致出现 gitlab 小部分跳转的链接url端口错误。
由于问题也比较小众,甚至不知如何搜这个问题,在百愁莫展之际,搜了下最基础的部署教程,找到了解决方案,其实也是个很基础的配置问题。在此教程中找到的答案:通过 Docker 快速部署公司内部 GitLab
gitlab.rb 1
2
3
4
5
6
7
8
9external_url 'http://[ip/hostname]:3300'
# nginx默认会去external_url中获取端口用以访问,但我们窗口只映射了80,所以还需要nginx指向的端口到80
nginx['listen_port'] = 80
# https需要下面这句
# nginx['redirect_http_to_https_port'] = 443
# 配置 1011 端口
gitlab_rails['gitlab_shell_ssh_port'] = 1011不知是何原因,我的gitlab还没多少项目存放,每天却按 1G 以上的大小占用了我的硬盘,GITLAB是架设在本地机子中的VM虚拟机的,暂时没空解决这个问题,就只好先对虚拟机扩容了。
发现gitlab应该下的prometheus文件夹大到爆炸,通过查询prometheus的必要性后,我对其直接停用处理了。
gitlab.rb 1
2# 停用prometheus
prometheus_monitoring['enable'] = false
按上述修改完成后 重启gitlab就可以啦
1 |
|
我的gitlab最终效果~

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!


