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 Cloud
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.phpview, like on any server. - With Laravel Octane, Bref returns the
php/503.htmlfile (orphp/503.jsonfor JSON requests) from the root of your project. Without these files, Bref returns a default maintenance page.
Last updated on