使用 github 和 Elastic Beanstalk 确保配置文件安全?
Keep config file secure using github and Elastic Beanstalk?
我正在使用 github (public) 来跟踪我的 Web 应用程序并将其部署到 Elastic Beanstalk。有没有一种好方法可以确保我的配置文件安全,其中包含 RDS username/password?我必须将文件添加到 git 才能将其推送到 Elastic Beanstalk,但这将使 github 上的每个人都可以看到我的密码...?有什么建议么?谢谢!
你的直觉是正确的!绝对让你的 keys/passwords/credentials 远离你提交的代码库。
Elastic Beanstalk 正是为此目的在控制面板中提供了环境变量。官方文档可以在这里找到:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-ruby
可以通过 Elastic Beanstalk 编辑这些环境变量UI。
然后您可以在 .yml
配置文件中引用这些变量,例如password: <%= ENV['PARAM1'] %>
.
我正在使用 github (public) 来跟踪我的 Web 应用程序并将其部署到 Elastic Beanstalk。有没有一种好方法可以确保我的配置文件安全,其中包含 RDS username/password?我必须将文件添加到 git 才能将其推送到 Elastic Beanstalk,但这将使 github 上的每个人都可以看到我的密码...?有什么建议么?谢谢!
你的直觉是正确的!绝对让你的 keys/passwords/credentials 远离你提交的代码库。
Elastic Beanstalk 正是为此目的在控制面板中提供了环境变量。官方文档可以在这里找到:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-ruby
可以通过 Elastic Beanstalk 编辑这些环境变量UI。
然后您可以在 .yml
配置文件中引用这些变量,例如password: <%= ENV['PARAM1'] %>
.