容器部署:
docker run -d -p 80:80 -p 2222:22 --name gitlab --restart=always -v gitlab-conf:/etc/gitlab:rw,z -v gitlab-data:/var/opt/gitlab:rw,z -v gitlab-logs:/var/log/gitlab:rw,z gitlab/gitlab-ce:16
修改配置文件:
external_url 'https://gitlab.test.com'
gitlab_rails['gitlab_ssh_host'] = 'gitlab.test.com'
gitlab_rails['gitlab_shell_ssh_port'] = 220
nginx['listen_port'] = 80
nginx['listen_https'] = false
#gitlab_pages['listen_proxy'] = "localhost:80"
letsencrypt['enable'] = false
nginx['redirect_http_to_https'] = false
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.test.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.test.com.key"
禁用捆绑的 NGINX,在 /etc/gitlab/gitlab.rb 中设置:
nginx['enable'] = false
使用gitlab内部nginx,默认会使用https,下面配置将关闭nginx https监听
nginx['listen_https'] = false
评论区