Created
February 18, 2025 04:24
-
-
Save finagin/a4ad68ee5827c1f88dc3443bb2a7e217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
if [ "$#" -gt 0 ]; then | |
exec php artisan "$@" | |
else | |
if [ ! -f .env.$APP_ENV.encrypted ]; then | |
echo "Encrypted .env file for \"$APP_ENV\" not found, skipping..." | |
else | |
php artisan env:decrypt --env=$APP_ENV --filename=.env --force | |
fi | |
if [ "$APP_ENV" != "local" ]; then | |
php artisan optimize | |
fi | |
php artisan storage:link | |
exec php-fpm | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment