[DRE-commits] [gitlab] 07/08: create secrets.yml

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Thu Feb 18 12:48:00 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 d4d931cac09c3cf78b6ba8680e4bb2d03dc58ada
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Thu Feb 18 18:12:32 2016 +0530

    create secrets.yml
---
 debian/rake-tasks.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh
index f04e500..156db7e 100755
--- a/debian/rake-tasks.sh
+++ b/debian/rake-tasks.sh
@@ -3,6 +3,12 @@
 # Only exported variables will be passed on to gitlab app
 export $(cat /etc/gitlab/gitlab-debian.conf)
 
+if ! [ -f "${gitlab_app_root}/config/secrets.yml" ]; then
+  echo "Creating secrets.yml..."
+  gitlab_app_secret=$(openssl rand -hex 64)
+  cp ${gitlab_app_root}/config/secrets.yml.example ${gitlab_app_root}/config/secrets.yml
+  sed -i "s/# db_key_base:/db_key_base: ${gitlab_app_secret}/" ${gitlab_app_root}/config/secrets.yml
+fi
 echo "Initializing database..."
 if [ "$(su postgres -c 'psql gitlab_production -c \\d')" = \
 "No relations found." ]; then

-- 
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