Engine Yard provides two methods of posting a maintenance page for your application. You can control the maintenance page via the dashboard in the UI, or you can use the Engine Yard command line interface.
This document contains the following sections:
Customize maintenance messages
Enable maintenance via the dashboard (UI)
Enable maintenance via the command line (CLI)
Customize maintenance messages
Engine Yard provides a default maintenance page, but you are encouraged to customize it to suit your application.
You can change your maintenance page on every deploy to give deploy-specific feedback (for example, "Database maintenance in progress - Please try again later - Thank You for your patience.").
When a rollback is performed, the maintenance page used is the one contained in the latest deploy. This prevents showing users a message from an old deploy.
When a maintenance page is requested to be displayed, Engine Yard looks for HTML files and displays them based on the following priority:
public/maintenance.html.custom
public/maintenance.html.tmp
public/maintenance.html
public/system/maintenance.html.default
Enable maintenance via the dashboard (UI)
Note: It is also possible to enable/disable maintenance mode via the CLI; commands initiated via the CLI will not be reflected in the UI.
To view the state of maintenance mode
- Navigate to the environment page from the Engine Yard dashboard.
-
Scroll down to the More Option section and click Maintenance.
-
You can view the current state of maintenance at the top of the page.
Note: This status indicates only maintenance requests initiated from the UI (not the CLI-initiated requests).
-
You can view the history of maintenance requests at the bottom of the page.
Note: This list shows only maintenance requests initiated from the UI (not the CLI-initiated requests).
To enable maintenance mode
- Select Enable Maintenance Mode.
-
Select the application(s) within the environment where maintenance is required.
- Click Update.
- Navigate to your app to verify that the maintenance page appears (the web app is not available).
To disable maintenance mode
- Select Disable Maintenance Mode.
-
Select the application(s) within the environment where maintenance is complete.
- Click Update.
- Navigate to your app to verify that the maintenance page no longer appears (the web app is available).
Enable maintenance via the command line (CLI)
To display or remove your maintenance pages, you can use the Engine Yard CLI by running the following commands:
- Display your maintenance page (disables the web app and then displays the maintenance page)
ey web disable
- Remove your maintenance page (removes the maintenance page and enables the web app)
ey web enable
Notes:
- Maintenance commands initiated via the CLI will not be reflected on the maintenance page UI.
- The CLI commands are enabling and disabling the web app; the UI commands are enabling and disabling maintenance mode (so the same words have opposite effects).
- For more information see Deploy from the Engine Yard CLI.
Troubleshooting
This table contains troubleshooting tips related to maintenance pages.
Symptom | Solution |
---|---|
The following message appears: Current repository layout does not allow for maintenance pages! |
Delete the 'system' folder from your application repository and re-deploy in order to use the maintenance page. |
The maintenance state list shows that maintenance is enabled for my app, but it is not (the web app is available). | Maintenance was probably controlled via the CLI. |
The maintenance state list shows that maintenance is disabled for my app, but it is not (the web app is not available). | Maintenance was probably controlled via the CLI. |
More information
This table provides other resources related to maintenance pages.
For more information about... | See... |
---|---|
Introduction to upgrade and related tools | Upgrade Guide |
Engine Yard CLI | Engine Yard command line interface |
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.
The commands listed above are backwards. It should be:
Hi Eric, thanks for pointing that out. Those 2 lines were a little confusing, so I tried rewording (and providing a little more info in parenthetical notes). Hopefully that corrects and clarifies for all.
Thanks again for helping to keep the docs up to date. kjm
Hi guys,
Is there any way that we can display a page from an external site? Eg; http://codehire.statushub.io?
Hi Dan, sorry for the belated reply. Just asked and our Support dudes say -
It's probably going to require some customization - they can contact support and we can help them do it. I think it'll be possible.
Good luck! kjm
Hi, images and css requests from our maintenance page are also getting redirected to the maintenance page, meaning not styles or images. Is there some way around this other than hosting the images and css off-site? Thanks
To all who come hence with a custom web root folder name,
Above when they say "public" folder. They literally mean a folder called "public" and not your custom web root folder.
Cheers!