且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不提交文件的情况下使用secret yaml配置文件部署heroku应用程序?

更新时间:2023-09-20 21:28:34

Heroku对此有一些指导 -

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


In other rails projects, I'd have a local database.yml and in source code repository only commit the database.sample file. When deploying, a capistrano script that would symlink a shared version of database.yml to all the releases.

When deploying to heroku, git is used and they seem to override database.yml altogether and do something internal.

That's all fine and good for database.yml, but what if I have s3 configurations in config/s3.yml. And I'm putting my project on github so I don't want to commit the s3.yml where everyone can see my credentials. It'd rather commit a sample s3.sample which people will override with their own settings, and keep a local s3.yml file uncommitted in my working directory.

what is the best way to handle this?

Heroku have some guidance on this -

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