Maintenance Mode
Maintenance mode takes an environment offline and displays a maintenance page to visitors. SKE implements maintenance mode through redeployment, not php artisan down.
Why not artisan down?
Section titled “Why not artisan down?”On traditional servers, artisan down writes a file to the filesystem that Laravel checks on each request. On serverless infrastructure, the filesystem is ephemeral — each function invocation or container instance starts fresh. A maintenance file written in one instance doesn’t exist in others, and it disappears when the instance is recycled.
SKE solves this by redeploying the environment with a maintenance flag. The adapter binary detects the flag and serves a maintenance response for all requests without forwarding them to your application.
Enabling maintenance mode
Section titled “Enabling maintenance mode”ske maintenance:on --env production⠋ Enabling maintenance mode...✓ Maintenance mode enabled for productionThis triggers a redeployment that activates the maintenance flag. All incoming requests receive a 503 Service Unavailable response with a maintenance page.
Disabling maintenance mode
Section titled “Disabling maintenance mode”ske maintenance:off --env production⠋ Disabling maintenance mode...✓ Maintenance mode disabled for productionThis triggers another redeployment that removes the maintenance flag. Traffic resumes normally.
Behavior during maintenance
Section titled “Behavior during maintenance”- All HTTP requests return
503 Service Unavailable - Queue processing is paused
- Scheduled tasks continue to fire but are skipped by the application
- The environment remains provisioned — no infrastructure is torn down
- The deployment history shows entries of type
maintenance
Checking status
Section titled “Checking status”ske status --env productionThe output includes the maintenance mode state:
Deployment #44 Type: maintenance Status: succeeded Maintenance: ON