Chen Kinnrot
Chen Kinnrot

Reputation: 21015

Keeping production configuration files hidden from developers

I got to the part of my system evolution that I got some files that contains credentials for sensitive data, I'm using git based deployment via heroku, and would like to keep doing that easy way.

How can I remove a few configuration lines from one branch, keep it on the other and make sure it stays there when merge occur?

What the best practive here?

Upvotes: 1

Views: 71

Answers (2)

Isantipov
Isantipov

Reputation: 20929

I you were a Microsoft.NET shop you could use config file includes:

<connectionStrings configSource="HerokuSpecificConfigFile.config" />

Your publish profile transformation than would replace development connection strings with the include line above. This would allow you to keep HerokuSpecificConfigFile.config in your deployment remote only.

Upvotes: 0

John Beynon
John Beynon

Reputation: 37507

Sensitive data should not be in source control - you should use Heroku config variables which will then be exposed as environment variables in your application. Read more on the Heroku site at https://devcenter.heroku.com/articles/config-vars

Upvotes: 3

Related Questions