#!/usr/bin/env sh set -e if [ -z "${APP_KEY}" ]; then export APP_KEY="base64:$(php -r 'echo base64_encode(random_bytes(32));')" fi mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache chmod -R ug+rwX storage 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 "$@"