Elastic Beanstalk防止文件覆盖 [英] Elastic Beanstalk Prevent Files Overwriting

查看:47
本文介绍了Elastic Beanstalk防止文件覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以有一点背景,我试图使用Elastic Beanstalk和Wordpress设置本地的暂存和生产环境.

So a little background i am trying to setup a local staging and production environment using Elastic Beanstalk and Wordpress.

所以我在git上安装了本地环境,并且在

So i have a local environment setup with git and i have the following in the

.gitignore.
#################
## WordPress
#################
.git-rewrite/
local-config.php
.elasticbeanstalk/
Linux/

我已经安装了ELB CLI,并且可以运行

I have the ELB CLI installed and i can run

git aws.push

它可以部署到分阶段,我也可以运行.

and it deploys to staging and i can also run.

git aws.push --environment main-env-production

效果很好,但令我沮丧的是,我在本地安装了W3 Total Cache插件,而在本地MAMP设置中没有安装memcached.

Works great but here is my frustration i have W3 Total Cache plugin installed locally and i dont have memcached installed on my local MAMP setup.

每种设置都使用不同的数据库,我有两种RDS设置,一种用于登台,一种用于生产.

Each setup is using a different database i have two RDS setups one for staging and one for production.

我在暂存环境的总缓存插件中设置了所有缓存信息,并使用memcached设置了对象缓存并输入了我的弹性缓存节点网址.

I setup all my cache information within the total cache plugin on my staging environment i setup object cache with memcached and enter my elastic cache node url.

但是每次我运行aws.push时,似乎都覆盖了我所有的设置,正如您所了解的那样,这确实很烦人,有人可以解释为什么这样做吗?

But everytime i run aws.push it seems to overwrite all my settings which as you can understand is really annoying can anyone explain why it might be doing this?

我是否必须使我的本地版本完全反映登台和生产环境,怎么可能只用beantalk版本某些文件夹呢?

Do i have to have my local version completely mirror the staging and production environments how do you only version certain folders with beanstalk is this even possible.

真的很想拥有一个可以正常运行的设置.

Thanks really want to have a setup that works.

推荐答案

首先,您使用的是旧版本的EB CLI.但这与您的问题无关.

First of all you are using a very old version of the EB CLI. But that’s irrelevant to your problem/question.

您怎么可能只用beantalk版本某些文件夹呢?

how do you only version certain folders with beanstalk is this even possible?

否,这是不可能的.让我解释一下豆茎在做什么.

No, this is not possible. Let me explain what beanstalk is doing.

Elastic Beanstalk将文件存储在某个目录中,为简便起见,我们将其称为/app/.每次部署(aws.push)时,EB都会删除整个目录/app/,并将其替换为新版本的代码.

Elastic Beanstalk stores your files in a certain directory, lets call it /app/ for brevity. Everytime you deploy (aws.push) EB deletes the entire directory /app/ and replaces it with the new version of your code.

基本上,Elastic Beanstalk上没有版本控制的概念. aws.push 是一项单独的服务,可获取您的版本文件,构建完整的代码zip文件并将其部署到弹性beantalk中.

Basically, there is no concept of versioning on Elastic Beanstalk. aws.push is a separate service that takes your versioned files, builds a full code zip file, and deploys it to elastic beanstalk.

这篇关于Elastic Beanstalk防止文件覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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