erm
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
require_app_secret() {
|
||||
if [ -z "${APP_SECRET:-}" ]; then
|
||||
echo "APP_SECRET environment variable is required at runtime" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -f bin/console ]; then
|
||||
require_app_secret
|
||||
fi
|
||||
|
||||
if [ "${RUN_MIGRATIONS_ON_START:-1}" = "1" ] && [ -f bin/console ]; then
|
||||
if [ "${DATABASE_DRIVER:-sqlite}" = "sqlite" ]; then
|
||||
SQLITE_PATH="${DATABASE_SQLITE_PATH:-/var/www/html/var/data/database.sqlite}"
|
||||
@@ -15,5 +26,11 @@ if [ "${RUN_MIGRATIONS_ON_START:-1}" = "1" ] && [ -f bin/console ]; then
|
||||
su-exec www-data php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
||||
fi
|
||||
|
||||
if [ -f bin/console ]; then
|
||||
su-exec www-data php bin/console cache:clear --no-warmup
|
||||
su-exec www-data php bin/console cache:warmup
|
||||
chown -R www-data:www-data var
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user