如何告诉引擎码不要删除.gitignore中的文件 [英] How to Tell Engine Yard to Not Delete a File in the .gitignore

查看:124
本文介绍了如何告诉引擎码不要删除.gitignore中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了给您一些背景信息,我尝试使用 Figaro 安全地添加环境变量,而无需不必担心安全隐患.问题是我似乎无法让Engine Yard在生产中表现出色.

To give you some context, I'm trying to use Figaro to safely add in environment variables without having to worry about security risks. The problem is is that I can't seem to get Engine Yard to play nice with production.

我去做了一个touch application.yml,然后是vim application.yml i ,然后是 command + v 来插入该api键什么都不是.我知道ENV['VARIABLES']的工作是因为开发,并且我所有的rspec和Cucumber测试(利用了API)都通过了.

I went and did a touch application.yml and then vim application.yml, i, and then command+v to insert that api keys and what not. I know the ENV['VARIABLES'] work because of development and all my rspec and cucumber tests (which utilize the APIs), passed.

一切准备就绪后,在.gitignore中添加:

When I've got everything ready, I add within the .gitignore:

# Ignore application configuration
/config/application.yml

然后,我部署该站点.我打开它,数据不再传递给API.好吧...

Afterwards, I deploy the site. I open it up and data isn't going to the APIs anymore. OK...

cd进入配置并发现application.yml不再存在.将其粘贴回......重新部署该站点,因为它现在知道必须忽略该文件,并且在生产中看不到任何更改.再次检查...,它又消失了!

cd into config and discover application.yml isn't there anymore. Paste it back in... Redeploy the site since now it understands it has to ignore that file and I'm not seeing changes on production. Check back... and its gone again!

沉迷于正在发生的事情.

Stumped on what's going on.

推荐答案

仅将文件放入已部署的应用程序的文件系统中是不起作用的,因为每次部署时都会得到一个干净的环境. EngineYard无法知道您是否希望将该特定文件复制到该特定位置,而无需进行额外的工作.

Simply putting a file into your deployed application's filesystem will not work because you get a clean environment each time you deploy. EngineYard cannot know that you want that particular file copied to that particular location without a little bit of extra work.

他们的官方建议是将每次使用 查看全文

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