Chapter 15 of 15

Production deployment.

Build an immutable release, configure its environment, and verify writable runtime paths.

Preparing the release

Install production Composer dependencies and build frontend assets if the application has them. Set APP_ENV=production, a secret APP_SECRET, and the correct APP_BASE_URL; point the document root at public/.

Deployment checklist
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:status

Run migrations as a controlled deployment step. Adapt the sample commands to your release process.

Runtime and post-deploy checks

The PHP process needs write access to the parts of storage/cache and storage/writable it uses. The first production request or CLI command creates the config cache. After deployment, check the health endpoint and logs; verify sessions, cron tasks, and queue workers if the application uses them.

Detailed technical documentation on GitHub