Deploying Orchard.Web from source on AppHarbor

Topics: Installing Orchard
Sep 22, 2011 at 1:36 AM
Edited Sep 22, 2011 at 1:40 AM

There are a number of guides demonstrating how to run Orchard on AppHarbor using Microsoft’s WebMatrix (Link, Link), but what about using the source Orchard.Web folder?

If you commit the entire folder (Orchard.Web) to AppHarbor, the build process will fail. You must remove numerous project files and DLL’s before it will successfully build.

1. Enter Git Excludes

I have created a git exclude list for the Orchard.Web folder. You can view the list here. (Save as exclude (no extension) to directory .git/info/).

The exclude list removes all non required file references from the git commit to AppHarbor. The files excluded are those used by Visual Studio to compile the core DLL’s (done locally, not by AppHarbor). Using excludes is an easy way to commit the files we want from the Orchard.Web folder to AppHarbor without having to manually remove them from the directory structure. (You can commit straight from your source folder if you want to!).

2. Settings.txt as binary (Skip this if you are not uploading data from the App_Data folder)

You still need to make sure your App_Data Settings.txt files are treated as a binary. I used the git attributes file for this. See here for the code. (Save as attributes (no extension) to directory .git/info/).

See here for reference from AppHarbor, section: Push Application to AppHarbor, item 3.

3. log4net.dll

You must copy log4net.dll to the Orchard.Web/bin/ folder manually. It is not added to the bin folder when using the Visual Studio build or package commands.


That’s it, you’re done. Follow the git instructions (note the caveats below!) on AppHarbor and that's it.


You must add the exclude and attributes files after the git init command but before the git add command, or you will add the entire Orchard.Web folder to the git commit.

Thanks to AppHarbor for providing an awesome service and to the Orchard team for an outstanding platform.

Edit: Removed pastie download links, line breaks not rendered in file.