将多个平台部署到Elastic Beanstalk(PHP/Python) [英] Deploy multiple platforms to Elastic Beanstalk (PHP/Python)

查看:135
本文介绍了将多个平台部署到Elastic Beanstalk(PHP/Python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将多个平台部署到AWS?

Is it possible to deploy multiple platforms to AWS?

我有一个PHP应用程序,我也想运行一个小的python脚本.

I have a PHP application that I would also like to run a small python script.

我看到PHP平台默认安装Python,但是使用eb deploy AWS不会选择requirements.txt并安装依赖项.

I see the PHP platform installs Python by default, but using eb deploy AWS does not pick up requirements.txt and install the dependencies.

我尝试手动安装requirements.txt,而在尝试安装lxml时挂起. 我也尝试添加配置文件:

I have tried installing requirements.txt manually which hangs when trying to install lxml. I also tried adding a config file:

option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: application.py
    NumProcesses: 3
    NumThreads: 20

但是现在eb deploy抱怨:

ERROR: "option_settings" in one of the configuration files failed validation. More details to follow.
ERROR: Unknown or duplicate parameter: WSGIPath                     
ERROR: Unknown or duplicate parameter: NumThreads                   
ERROR: Unknown or duplicate parameter: NumProcesses  

我相信这是因为eb认为这只是一个PHP应用程序.

Which I believe is because eb thinks this is only a PHP app.

并行运行多个平台的正确方法是什么?

What is the proper way to run multiple platforms side-by-side?

推荐答案

在部署期间使用 .ebextentions 在容器中运行预安装命令已解决,这需要

Solved by using .ebextentions to run pre-install commands in the container during deployment, which required setting the system path during eb deploy

这篇关于将多个平台部署到Elastic Beanstalk(PHP/Python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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