Commands
Flags for the maintenance:down command in AdonisJS: --secret to bypass, --template for a custom Edge page, --redirect, plus --retry and --refresh
Allow bypassing maintenance
When providing a secret using the --secret flag you can bypass the maintenance mode by accessing the url https://<mysite>/<secret>.
node ace maintenance:down --secret <secret>You will be redirected with a cookie containing the hash of the secret. Consequent requests will bypass the maintenance.
Rendering a custom maintenance page
To render a custom maintenance page you must have Edge.js installed and use the --template flag.
node ace maintenance:down --template <template>To limit runtime execution during maintenance mode, the template is prerendered when activating maintenance.
Redirect users
You can redirect users to a different url by using the --redirect flag.
node ace maintenance:down --redirect /maintenanceRefresh and retry
You can configure the Refresh and Retry headers using the --refresh and --retry flags.
node ace maintenance:down --retry 30 --refresh 30retryAfter.Getting Started
Adding @foadonis/maintenance registers its provider for you, so node ace maintenance:down takes the app offline and maintenance:up brings it back live.
Drivers
Configure the file or cache driver in config/maintenance.ts to store maintenance state, or extend MaintenanceDriver to build your own custom driver