Explicitly call /usr/bin/bundle to avoid gem installed bundler

This commit is contained in:
Pirate Praveen 2018-12-18 12:14:07 +05:30
parent a4a65b4d7b
commit 739cdc7332
2 changed files with 5 additions and 5 deletions

View file

@ -11,4 +11,4 @@ cd /usr/share/gitlab
# Check gitlab is configured correctly
printf "Check if Gitlab is configured correctly...\n"
runuser -u ${gitlab_user} -- sh -c "bundle exec rake $@"
runuser -u ${gitlab_user} -- sh -c "/usr/bin/bundle exec rake $@"

View file

@ -18,12 +18,12 @@ if [ "$db_relations" = "No relations found." ] || \
"cp ${gitlab_data_dir}/db/schema.rb.template ${gitlab_data_dir}/db/schema.rb"
runuser -u ${gitlab_user} -- sh -c \
"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 '/usr/bin/bundle exec rake db:schema:load'
else
echo "gitlab_production database is not empty, skipping gitlab setup"
fi
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake db:migrate'
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake db:migrate'
# Restrict permissions for secret files
chmod 0700 ${gitlab_data_dir}/.gitlab_shell_secret
@ -37,10 +37,10 @@ runuser -u ${gitlab_user} -- sh -c '/var/lib/gitlab/yarn/node_modules/.bin/yarn
runuser -u ${gitlab_user} -- sh -c 'find /var/lib/gitlab/.cache/yarn/v4/ -name .yarn-metadata.json -perm -a=w -exec chmod 644 {} \;'
echo "Precompiling locales..."
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake gettext:po_to_json'
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake gettext:po_to_json'
echo "Precompiling assets..."
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake tmp:cache:clear assets:precompile'
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake tmp:cache:clear assets:precompile'
echo "Webpacking..."
#runuser -u ${gitlab_user} -- sh -c 'rm -rf node_modules/webpack'