[Dancer-users] "sensitive" config data in SCM

David Precious davidp at preshweb.co.uk
Thu Sep 8 20:02:49 CEST 2011


On Thursday 08 September 2011 17:42:18 Mr. Puneet Kishor wrote:
> Not a Dancer question per se, but I am sure a few of you have encountered
> this, and it is a "best practice" issue I am encountering for my Dancer
> apps, so --
> 
> I have hard at work learning Git, striving to put all my work in a Git repo
> (including Github, where appropriate). Yesterday I realized that I would
> be committing my database and other passwords to the repo as well

I would be inclined to simply put the database config into 
environments/production.yml, and *not* commit that file.

So, non-sensitive app config goes in config.yml, but the sensitive stuff is 
not included.

(You'll probably, at some point, want to have differing database config for 
development and production anyway...)



> (I am using the most excellent Dancer::Plugin::Database). 

Thanks - always good to hear of happy users :)


> A little bit of
> searching brought me to the conclusion that I had to implement some kind
> of "smudge" and "clean" filters using .gitattributes -- so when I commit
> my work to the repo, the sensitive info would get replaced by **** (or
> other placeholders), and when I would checkout the work, the placeholders
> would get replaced by the real info.

Hmm, that sounds interesting!

If you do take that option, I'd be interested to see what you come up with!

Cheers

Dave P


-- 
David Precious <davidp at preshweb.co.uk> (bigpresh)
http://www.preshweb.co.uk/

  "Programming is like sex. One mistake and you have to support 
  it for the rest of your life". (Michael Sinz)


More information about the Dancer-users mailing list