我正在使用Elastic Beanstalk来部署根应用程序(node.js),并且还想运行node.js app需要在同一个ec2实例中调用的php代码 .
当我连接到实例时,它说:
此EC2实例由AWS Elastic Beanstalk管理 . 如果实例被自动缩放替换,则通过SSH进行的更改将丢失 . [...]
这意味着当我在 /var/www/
文件夹中添加php源代码(通过ssh连接)时,如果实例发生更改,它将被删除 .
我怎么能在同一个实例node.js和php中运行?
2 回答
您可以探索基于ECS的多容器选项,以便在每个beanstalk环境中运行多个容器 .
文档:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecstutorial.html
您是否希望两个应用程序在同一个实例上运行?
也许是这样的:
**
**
我不久前遇到了类似的情况,这对我有用 .
来源:http://qpleple.com