Omnibus Gitlab version 7.4.3 at a custom relative_url_root (http://mydomain/gitlab)

旧街凉风 提交于 2020-01-15 07:44:08

问题


I have successfully installed older versions of gitlab and hosted them at a location like this:

mydomain/gitlab

with the new version of gitlab doing all of the config though the gitlab-ctl and via me editing the /etc/gitlab/gitlab.rb I'm not sure how to achieve this set-up.

I find lots of documentation on stackexchange for older versions of gitlab that did not use gitlab-ctl for configuration but not for the new version. Presently I have gitlab installed and running fine at:

mydomain

I want to move it to:

mydomain/gitlab

Anybody know how to do this for version 7.4.3?

Thanks :)


回答1:


Serving from a relative URL root seems to be simply not implemented on Omnibus GitLab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/ed51ec97401bba955c93e61f8ef860520f745837/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb#L24 (since no template variable is inserted there)

You could work around that by modifying all the required configuration files manually as explained in the comment on gitlab.yml, but that would really be a lot of manual work and those configs would get overwritten if you reconfigure, so I recommend you request the feature at: http://feedback.gitlab.com/forums/176466-general and send a pull request implementing that.

This problem was also raised at: Omnibus GitLab on IP without a domain-name and with custom relative_url_root




回答2:


I ran across this same issue this week and set out to find a solution. I'm not all that familiar with RoR so I ended up creating a Bash script to automate the process instead.

Now it'd be a lot nicer if we could just automate all this through /etc/gitlab/gitlab.rb and hopefully somebody sets that up at some point (maybe someone has that I just can't find?), but in the meantime feel free to use this script as needed. Run as root on a system with a GitLab Omnibus-package installation. Tested on GitLab CE 7.9.0 with Bash 4.2.

GitLab Relative URL Setter



来源:https://stackoverflow.com/questions/26719704/omnibus-gitlab-version-7-4-3-at-a-custom-relative-url-root-http-mydomain-gitl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!