Maintenance Mode for your AppHarbor Application
A switch for setting applications in maintenance-mode while performing upgrades to app databases and such, has been a common request for a while. In general, we think you should try to build your application to allow for smooth upgrades without scheduled downtime, but with that said, we are happy to report that you can now place an AppHarbor application in maintenance mode with ease. Best of all, we did not have to lift a finger to make this happen. The feature was built by Drew Miller using AppHarbor application build URLs.
To place an application in maintenance mode, copy the build URL from the application dashboard, paste it in to maintman.apphb.com and hit "Turn On". MainMan will now post a message to your application's build URL. This makes AppHarbor download an archive containing a static App_Offline.htm
page generated by MaintMan. This page gets speedily deployed and your application is now in maintenance mode. Once maintenance is complete, you simply deploy a previous commit from the AppHarbor dashboard or push a new one.
You could, of course, add an App_Offline.htm
to your primary repository and push "going into maintenance mode" commits to achieve a similar effect. This is tedious though, and will crud up your revision history with commits unrelated to the development of your application.
Drew has made the MaintMan source code available on Githhub. In case you don't trust Drew with your build url (he could hoard it, for example, and use it to randomly push code that Rickrolls users), you can clone the repository and push your own, private MaintMan installation to AppHarbor.
Have an idea for other interesting uses for the application build URLs? Check out the documentation and let us know if you come up with something cool.