Laravel
Deploy a Laravel image with a managed database, migrations, workers, and a scheduler.
From the project canvas, open Add → Laravel App. Enter the versioned image from your workspace registry or another registry your workspace can pull from. The image should run the HTTP server by default, with PHP and artisan available from its working directory.
Choose PostgreSQL or MySQL and set the HTTP port and readiness path. New apps receive a generated APP_KEY. When moving an existing app, enter its original key to keep data it has encrypted readable.
Enable the processes and services your app uses:
- Queue worker consumes the default queue through
php artisan queue:work. - Task scheduler runs the schedule already in your application. Keep this service at one replica unless your tasks use Laravel's distributed locks.
- Redis sets up Redis for queues and cache. The app image needs the corresponding Laravel Redis client.
- Private S3 uploads sets the environment variables for Laravel's S3 disk. Include the Flysystem S3 adapter in your app.
- Transactional email sets SMTP connection variables. Verify a sending domain and set
MAIL_FROM_ADDRESSbefore sending.
The setup starts data services before the web release. A release configured for migrations runs php artisan migrate --force before web instances roll out. The previous web release continues serving if the command exits unsuccessfully. Use backward-compatible migrations because the previous web release can be handling requests while the migration runs.
Open the web service's deployment and choose Release Logs to read migration output. Run Artisan runs a command such as migrate:status in a ready app instance. Its output and exit code are shown in the dialog.
For automated deploys, build and push one image per commit from CI. Deploy web first, wait until it is running, then update workers and the scheduler to the same tag.