Feature: trigger migration automatically only in prod mode
This commit is contained in:
parent
dc19006738
commit
99ec0b765f
@ -36,6 +36,12 @@ fi
|
||||
if [ "${APP_ENV}" = "prod" ]; then
|
||||
composer dump-env "${APP_ENV}"
|
||||
chmod +r /var/www/app/.env.local.php
|
||||
|
||||
if [ "${PREVENT_MIGRATIONS}" != "true" ]; then
|
||||
php /var/www/app/bin/console doctrine:migrations:status
|
||||
php /var/www/app/bin/console doctrine:migrations:migrate -n
|
||||
php /var/www/app/bin/console messenger:setup-transports
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${CLEAR_CACHE}" != "false" ]; then
|
||||
@ -45,11 +51,5 @@ if [ "${CLEAR_CACHE}" != "false" ]; then
|
||||
chgrp ${PHP_FPM_GROUP} /var/www/app/var/log -R && chmod g+rw /var/www/app/var/log -R
|
||||
fi
|
||||
|
||||
if [ "${PREVENT_MIGRATIONS}" != "true" ]; then
|
||||
php /var/www/app/bin/console doctrine:migrations:status
|
||||
php /var/www/app/bin/console doctrine:migrations:migrate -n
|
||||
php /var/www/app/bin/console messenger:setup-transports
|
||||
fi
|
||||
|
||||
exec "${@}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user