Home > Hosting > Heroku > Maintenance page for Heroku hosted applications

Maintenance page for Heroku hosted applications

Hi All, In this post, I am going to explain how to place the maintenance page for Heroku hosted applications. The example we have application and hosted in Heroku. Now we want to do some changes for an existing application then we will place the maintenance page. So this post explains how can we achieve that.

Maintenance page for Heroku hosted applications by Anil Labs

Maintenance page for Heroku hosted applications by Anil Labs

Below are the simple steps to do that

Step1:

Install Heroku CLI (Command Line Interface) in your system by below link.
https://devcenter.heroku.com/articles/heroku-cli#download-and-install

Step2:

Create a maintenance page and uploaded to any hosting server
https://domain.com/maintenance.html or uploaded to AWS S3 buckets

Step3:

In the configuration variables please include below URL

MAINTENANCE_PAGE_URL   - https://[bucket name].s3-us-west-2.amazonaws.com/maintenance.html

Step4:

Login to Heroku

heroku login -i

email / password

Step5:

To enable maintenance page for the app

heroku maintenance:on --app [app name]

Note: Now domain under maintenance page will be displayed when we click the domain.

Step6:

To disable the maintenance page for the app

heroku maintenance:off --app [app name]

Note: Now domain will up and running

With these steps, we will place and remove the maintenance page for a domain in Heroku.

You may also like
How to fetch the URL in React.js application
Sending HTML template emails using SMTP in NodeJS
Deploy Node.js application to Heroku
How to create an app in Node.js

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.