Hosting BlogEngine blog on AppHarbor

Hosting BlogEngine blog on AppHarbor

June 21, 2011

I’ve being thinking about giving cloud hosting a try since Azure went into beta. But, the price of a single instance on Azure with a SQL database makes it completely impractical for personal blog. Good news: you can now jump into cloud without breaking the bank. Mountain View startup AppHarbor will give you one instance with 20MB SQL database for free! AppHarbor cloud hosting comes with a twist – instead of a traditional deployment mechanism than you locally compile your project, build the deployment package, and push it to the cloud, AppHarbor gives you a Git source repository from which it builds the solution on every commit, and deploys results of the successful builds to the site.

When I started the process of deploying BlogEngine on AppHarbor, I had some doubts about whether BlogEngine could work in the cloud environment. I can now say that it can, with some minor caveats. Due to the transient nature of application deployment in the cloud, all data should be stored in the database, external CDN, or must be checked into the source repository. If you want to embed image into your blog post, you must upload it to the external CDN first, and then link that location from your article. You can use DropBox as CDN as long as your site traffic is light, or you can get cloud storage for cheap from Amazon or Azure.

Installing BlogEngine on AppHarbor was surprisingly easy; in all, it took about two hours including downloading BlogEngine’s sources, installing the Git client, reading instructions, and going through a few failed builds. Here is a brief overview of the steps I made to get a copy of my blog deployed to AppHarbor:

One bit of strange behavior that I noticed was that absolute links would fail to load, due to the requests being made on a port other than 80. Apparently this is a known issue that I’ve fixed by modifying AbsoluteWebRoot property in Utils.cs.