kolosy
kolosy

Reputation: 3099

managing production credentials in heroku

we're deploying a heroku app to production. it accepts credit card numbers, so we have to be careful with the credentials that are in it. we use git for source control. if i were deploying to a regular server, i'd keep the production config files separately, and copy them in when deploying.

the problem is that heroku uses git to deploy, so i have to commit my production stuff to git to be able to deploy to heroku. how do you keep those files from then going upstream?

the only thing i've thought was to make a local fork of the repo, and hook the fork to git. not sure if i like that though.

Upvotes: 3

Views: 324

Answers (1)

klaustopher
klaustopher

Reputation: 6941

you can set environment variables on heroku by using the heroku gem:

heroku config:add MYKEY=12345679

and you can use that in your heroku App using ENV['MYKEY']

See: http://devcenter.heroku.com/articles/config-vars

Upvotes: 6

Related Questions