22 lines
507 B
Bash
22 lines
507 B
Bash
#!/usr/bin/env sh
|
|
set -e
|
|
|
|
if [ -z "${APP_KEY}" ]; then
|
|
php artisan key:generate --force --no-interaction
|
|
fi
|
|
|
|
mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache
|
|
|
|
php artisan config:clear --no-interaction
|
|
php artisan view:cache --no-interaction
|
|
|
|
if [ "${RUN_MIGRATIONS}" = "true" ]; then
|
|
php artisan migrate --force --no-interaction
|
|
fi
|
|
|
|
if [ "${RUN_SEEDERS}" = "true" ]; then
|
|
php artisan db:seed --force --no-interaction
|
|
fi
|
|
|
|
exec "$@"
|