Cmd/Ctrl + K

Deployment

Production deployment should install optimized dependencies, configure the environment, build assets, run migrations, warm caches, and restart workers.

Install dependencies

Install locked production dependencies and compile frontend assets when the application uses them.

Skip Node.js steps when the application does not use Vite assets.

Configure environment

Set production values in .env or your platform environment:

Configure database, cache, session, queue, mail, and security values for the target environment.

Recommended production defaults:

Writable paths

The PHP process must be able to write to:

  • storage/
  • bootstrap/cache/
  • the SQLite database path, when SQLite is used

Migrate and optimize

Apply pending schema changes before building the production caches.

Clear caches when configuration or routes change:

Routes with closures cannot be cached. Use controller handlers before enabling route cache in production.

Queue workers

Run workers under a process supervisor:

Use sync only when jobs should run inline.

When using the database queue, publish and run queue migrations before starting workers:

Scheduler

Run the scheduler every minute:

Inspect tasks with:

Web server

Set the document root to public/. Static files should be served directly and all other requests should fall through to public/index.php.

Release checklist

Verify each deployment step before directing production traffic to the release.

  1. Install optimized Composer dependencies.
  2. Build frontend assets when used.
  3. Apply environment configuration.
  4. Run migrations.
  5. Run php vendor/bin/annabel optimize.
  6. Restart PHP and queue workers.
  7. Verify routes, logs, queues, scheduler, and the application health endpoint.