mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
do gitlab:setup after db:migrate
This commit is contained in:
parent
607df08b24
commit
aa64c67330
@ -1197,12 +1197,6 @@ migrate_database() {
|
||||
COUNT=$(PGPASSWORD="${DB_PASS}" psql -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER} -d ${DB_NAME} -Atw -c "${QUERY}")
|
||||
;;
|
||||
esac
|
||||
if [[ -z ${COUNT} || ${COUNT} -eq 0 ]]; then
|
||||
echo "Setting up GitLab for firstrun. Please be patient, this could take a while..."
|
||||
exec_as_git force=yes bundle exec rake gitlab:setup \
|
||||
${GITLAB_ROOT_PASSWORD:+GITLAB_ROOT_PASSWORD=$GITLAB_ROOT_PASSWORD} \
|
||||
${GITLAB_ROOT_EMAIL:+GITLAB_ROOT_EMAIL=$GITLAB_ROOT_EMAIL} >/dev/null
|
||||
fi
|
||||
|
||||
# migrate database if the gitlab version has changed.
|
||||
CACHE_VERSION=
|
||||
@ -1243,6 +1237,13 @@ migrate_database() {
|
||||
rm -rf ${GITLAB_TEMP_DIR}/GITLAB_RELATIVE_URL_ROOT # force cache cleanup
|
||||
fi
|
||||
|
||||
if [[ -z ${COUNT} || ${COUNT} -eq 0 ]]; then
|
||||
echo "Setting up GitLab for firstrun. Please be patient, this could take a while..."
|
||||
exec_as_git force=yes bundle exec rake gitlab:setup \
|
||||
${GITLAB_ROOT_PASSWORD:+GITLAB_ROOT_PASSWORD=$GITLAB_ROOT_PASSWORD} \
|
||||
${GITLAB_ROOT_EMAIL:+GITLAB_ROOT_EMAIL=$GITLAB_ROOT_EMAIL} >/dev/null
|
||||
fi
|
||||
|
||||
# clear cache if relative_url has changed.
|
||||
[[ -f ${GITLAB_TEMP_DIR}/GITLAB_RELATIVE_URL_ROOT ]] && CACHE_GITLAB_RELATIVE_URL_ROOT=$(cat ${GITLAB_TEMP_DIR}/GITLAB_RELATIVE_URL_ROOT)
|
||||
if [[ ! -f ${GITLAB_TEMP_DIR}/GITLAB_RELATIVE_URL_ROOT || ${GITLAB_RELATIVE_URL_ROOT} != ${CACHE_GITLAB_RELATIVE_URL_ROOT} ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user