configure gitlab_url correctly
This commit is contained in:
parent
cfd763ce5b
commit
6fb438e2b0
3 changed files with 17 additions and 0 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -6,6 +6,7 @@ gitlab (8.4.3+dfsg-1) UNRELEASED; urgency=medium
|
|||
* Use letsencrypt certificate paths if selected
|
||||
* Add git as dependency (Closes: #813807)
|
||||
* SSH key upload is working (Closes: #812861)
|
||||
* Configure gitlab_url as workwround (Closes: #813770 )
|
||||
|
||||
-- Pirate Praveen <praveen@debian.org> Fri, 05 Feb 2016 20:31:30 +0530
|
||||
|
||||
|
|
3
debian/postinst
vendored
3
debian/postinst
vendored
|
@ -70,6 +70,9 @@ case "$1" in
|
|||
# Check if ssl option is selected
|
||||
db_get gitlab/ssl
|
||||
if [ "${RET}" = "true" ]; then
|
||||
if ! grep GITLAB_HTTPS ${gitlab_debian_conf}; then
|
||||
echo GITLAB_HTTPS=${RET} >> ${gitlab_debian_conf}
|
||||
fi
|
||||
mkdir -p /etc/gitlab/ssl
|
||||
if [ -f "${nginx_ssl_conf_example_gz}" ]; then
|
||||
# undo dh_installdocs auto compress
|
||||
|
|
13
debian/rake-tasks.sh
vendored
13
debian/rake-tasks.sh
vendored
|
@ -21,6 +21,19 @@ else
|
|||
invoke-rc.d gitlab start
|
||||
fi
|
||||
|
||||
# Workaround for #813770
|
||||
if [ "${GITLAB_HTTPS}" = "true" ]; then
|
||||
gl_proto="https"
|
||||
sed -i "s/#port: 80/port: 443/" ${gitlab_home}/config/gitlab.yml
|
||||
sed -i "s/https: false/https: true/" ${gitlab_home}/config/gitlab.yml
|
||||
else
|
||||
gl_proto="http"
|
||||
fi
|
||||
|
||||
sed -i \
|
||||
"s/gitlab_url: http:\/\/localhost/gitlab_url: ${gl_proto}:\/\/${GITLAB_HOST}/"\
|
||||
${gitlab_shell_root}/config.yml
|
||||
|
||||
# Check gitlab is configured correctly
|
||||
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:check RAILS_ENV=production'
|
||||
|
||||
|
|
Loading…
Reference in a new issue