fix first time install issues

This commit is contained in:
Pirate Praveen 2017-12-13 00:48:01 +05:30
parent 122f7a820e
commit 6296a05bdc
2 changed files with 4 additions and 2 deletions

1
debian/gitlab.links vendored
View file

@ -24,4 +24,5 @@ usr/share/javascript/graphael/g.raphael-min.js usr/share/gitlab/vendor/assets/ja
usr/share/javascript/graphael/g.bar-min.js usr/share/gitlab/vendor/assets/javascripts/g.bar-min.js
usr/share/javascript/fuzzaldrin/fuzzaldrin-plus.js usr/share/gitlab/vendor/assets/javascripts/fuzzaldrin-plus.js
/var/lib/gitlab/.gitlab_workhorse_secret /usr/share/gitlab/.gitlab_workhorse_secret
/var/lib/gitlab/.gitlab_shell_secret /usr/share/gitlab/.gitlab_shell_secret
/var/lib/gitlab/Gemfile.lock /usr/share/gitlab/Gemfile.lock

View file

@ -16,13 +16,14 @@ if [ "$db_relations" = "No relations found." ] || \
test -f ${gitlab_home}/db/schema.rb || \
runuser -u ${gitlab_user} -- sh -c \
"cp ${gitlab_data_dir}/db/schema.rb.template ${gitlab_data_dir}/db/schema.rb"
touch ${gitlab_data_dir}/.gitlab_shell_secret
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake db:schema:load'
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake db:seed_fu'
else
echo "gitlab_production database is not empty, skipping gitlab setup"
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake db:migrate'
fi
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake db:migrate'
# Restrict permissions for secret files
chmod 0700 ${gitlab_data_dir}/.gitlab_shell_secret