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.
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
1 | MAINTENANCE_PAGE_URL - https://[bucket name].s3-us-west-2.amazonaws.com/maintenance.html |
Step4:
Login to Heroku
1 | heroku login -i |
email / password
Step5:
To enable maintenance page for the app
1 | 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
1 | 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.
0 Comments