Laravel Autorun Script

serversideup/php has a "Laravel Autorun" script that helps you automate certain steps during your deployments. By default, storage linking is the only automation enabled. You can disable the entire script by setting setting the AUTORUN_ENABLED variable. See our variable reference document for more details.

Available Automations

Storage Linking

php artisan storage:link

Storage linking is ENABLED by default. You can disable this behavior by setting AUTORUN_LARAVEL_STORAGE_LINK=false.

Database Migrations

php artisan migrate --force --isolated

Automatic migrations are DISABLED by default. To enable, set an environment variable of AUTORUN_LARAVEL_MIGRATION=true on your container. This requires Laravel v9.38.0 or higher.