如何在不提交文件的情况下使用secret yaml配置文件部署heroku应用程序? [英] How to deploy heroku app with secret yaml configuration file without committing the file?

查看:116
本文介绍了如何在不提交文件的情况下使用secret yaml配置文件部署heroku应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在其他rails项目中,我有一个本地database.yml,并且在源代码库中只提交database.sample文件。在部署时,一个capistrano脚本会将一个共享版本的database.yml链接到所有版本。



部署到heroku时,使用git,它们似乎覆盖数据库.yml完成并做一些内部的事情。

对于database.yml来说,这一切都很好,但如果我在config / s3.yml中有s3配置会怎样。我将我的项目放在github上,所以我不想提交s3.yml,每个人都可以看到我的凭据。它宁愿提交一个样本s3.sample,人们将用自己的设置来覆盖,并保留一个本地s3.yml文件在我的工作目录中未提交。



什么是处理这个问题的最好方法?

解决方案

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

这篇关于如何在不提交文件的情况下使用secret yaml配置文件部署heroku应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆