Deploy multiple platforms to Elastic Beanstalk (PH

2019-04-13 13:49发布

问题:

Is it possible to deploy multiple platforms to AWS?

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

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

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

But now eb deploy complains about:

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  

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?

回答1:

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