【问题标题】:How can Amazon Elastic Beanstalk take a custom python command?Amazon Elastic Beanstalk 如何采用自定义 python 命令?
【发布时间】:2020-06-20 06:48:59
【问题描述】:

我按照本教程使用 Amazon Elastic Beanstalk 部署 Flask (Python) Web 应用程序: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html

但是,我的 Web 应用程序是基于其他用户编写的代码构建的。当我在本地运行 Web 应用程序时,我运行以下命令:

python web/chat_app.py --port 12345 --config web/app_params.json --schema-path data/bookhatball-schema.json --scenarios-path scenarios_generated.json --output out

在将我的 Web 应用程序启动到 Amazon Elastic Beanstalk 时,我需要运行相同的 python 命令。我该怎么做呢?

【问题讨论】:

    标签: python amazon-web-services flask amazon-elastic-beanstalk


    【解决方案1】:

    根据 AWS 文档 here,您可以使用 .ebextensions 自定义 ElasticBeanstalk 环境,这包括在启动期间在实例上运行命令。

    您可以使用commands 键在 ElasticBeanstalk 实例上运行任何命令。您可以在 ElasticBeanstalk commands here 上找到更多信息。

    【讨论】:

      猜你喜欢
      • 2015-11-05
      • 2017-11-29
      • 2021-01-12
      • 2012-08-13
      • 2020-06-21
      • 2014-12-30
      • 2011-12-24
      • 2014-05-09
      • 2018-10-13
      相关资源
      最近更新 更多