intial commit
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Waiting for database connection..."
|
||||
until php -r "try { new PDO('mysql:host=${DB_HOST};port=${DB_PORT}', '${DB_USERNAME}', '${DB_PASSWORD}'); echo 'ok'; } catch(PDOException \$e) { echo \$e->getMessage(); exit(1); }" 2>/dev/null | grep -q 'ok'; do
|
||||
sleep 3
|
||||
done
|
||||
echo "Database connected."
|
||||
|
||||
php artisan migrate --force --isolated
|
||||
php artisan storage:link --force || true
|
||||
|
||||
if [ "${APP_ENV}" = "production" ]; then
|
||||
php artisan config:cache
|
||||
php artisan route:cache
|
||||
php artisan view:cache
|
||||
fi
|
||||
|
||||
exec php-fpm
|
||||
Reference in New Issue
Block a user