[DRE-commits] [gitlab] 02/02: configure gitlab_url correctly
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Tue Feb 9 16:09:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository gitlab.
commit 6fb438e2b02eefad0899fa8cba584134f591bf5f
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Tue Feb 9 20:51:38 2016 +0530
configure gitlab_url correctly
---
debian/changelog | 1 +
debian/postinst | 3 +++
debian/rake-tasks.sh | 13 +++++++++++++
3 files changed, 17 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 078a2c1..ee213e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 at debian.org> Fri, 05 Feb 2016 20:31:30 +0530
diff --git a/debian/postinst b/debian/postinst
index 7301dfe..0b9b860 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -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
diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh
index 399888d..4a3cc18 100755
--- a/debian/rake-tasks.sh
+++ b/debian/rake-tasks.sh
@@ -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'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git
More information about the Pkg-ruby-extras-commits
mailing list