Production deployment.
Build an immutable release, configure its environment, and verify writable runtime paths.
Preparing the release
Install production Composer dependencies, build frontend assets, set APP_ENV=production, provide a secure APP_SECRET, and configure the correct APP_BASE_URL. The document root must point to public/.
composer install --no-dev --classmap-authoritative
npm ci
npm run build
export APP_ENV=production
export APP_DEBUG=false
export APP_BASE_URL=https://example.com
vendor/bin/lemonade database:migrate
vendor/bin/lemonade database:migrate:statusRun migrations as a controlled deployment step. Adapt the sample commands to your release process and zero-downtime strategy.
Runtime and post-deploy checks
The PHP process must be able to write to the required parts of storage/cache and storage/writable. The first production request or CLI command creates the config cache automatically. Verify health checks, logs, sessions, cron tasks, and queue workers if the application uses them.