create secrets.yml
This commit is contained in:
parent
1e1bab6fb4
commit
d4d931cac0
1 changed files with 6 additions and 0 deletions
6
debian/rake-tasks.sh
vendored
6
debian/rake-tasks.sh
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue