Skip to Content
πŸŽ‰ Bref 3.0 is released. Read more β†’
DocumentationLaravelMaintenance mode

Maintenance mode

Similar to the php artisan down command, you may put your app into maintenance mode. All that’s required is setting the MAINTENANCE_MODE environment variable:

serverless.yml
provider: environment: MAINTENANCE_MODE: ${param:maintenance, null}

You can then deploy:

bref deploy --param="maintenance=1" # For a specific environment: bref deploy --env=prod --param="maintenance=1"

To take your app out of maintenance mode, redeploy without the --param="maintenance=1" option.

Maintenance page

In maintenance mode, the application responds with an HTTP 503 error:

  • With the PHP-FPM runtime (the default), Laravel renders its 503 error page. Customize it with a resources/views/errors/503.blade.php view, like on any server.
  • With Laravel Octane, Bref returns the php/503.html file (or php/503.json for JSON requests) from the root of your project. Without these files, Bref returns a default maintenance page.
Last updated on