I have a small project in which I am experimenting with AppHarbor . For those of you unfamiliar with it, AppHarbor allows you to automatically create and deploy ASP.NET MVC projects in the cloud by adding a specific remote Git remote and then redirecting your project / source to that remote.
The way I'm working right now is that I will have a master Git repository on GitHub , which I cloned onto my development machine. Then I add the AppHarbor remote to my working copy. I will make my changes, click on GitHub every few commits for safe storage, and when I'm ready to deploy the new version, I can just push it to AppHarbor.
While this is a big workflow, it causes a new problem for me regarding configuration files. What I used was to exclude Web.configfrom the original control and instead check the file with a name Web.config.examplethat contains all the correct keys, but with dummy values. Then I just make a copy of this file on my dev machine, delete the extension .exampleand edit the values that suit you.
When it comes to deployment, I will create another copy called Web.config.live, replace the values with the correct ones for the server, download them and remove the extension .live.
Now the problem is that if Web.configit is not under source control, when I click AppHarbor, the project will not work (because it lacks the correct configuration information). However, I don't want the live connection string to be publicly viewed on GitHub, which would be if I ever clicked Web.configon master repo.
What are my options here? I would appreciate any advice.
source
share