gpt4 book ai didi

amazon-web-services - 如果您不使用 git,有没有办法部署到 Elastic Beanstalk?

转载 作者:行者123 更新时间:2023-12-04 08:04:21 25 4
gpt4 key购买 nike

我正在开发一个 Elastic Beanstalk 应用程序。它是一个 Scala Web 应用程序,使用 sbt 构建.我想将生成的 WAR 从命令行部署到现有环境。

我只能找到 eb似乎要求您使用 git 的 CLI:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-getting-started.html

有没有一种方法可以简单地指定 WAR 和环境名称来执行部署?

否则最好的解决方法是什么?我可以从命令行上传到 S3,然后使用 Web 应用程序选择该文件,但这比我想要的要痛苦一些。

最佳答案

您可以使用 Elastic Beanstalk CLI ( eb )而不是 AWS CLI。就跑 eb create创建一个新环境和eb deploy更新您的环境。

您可以通过配置 EB CLI(阅读:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html#eb-cli3-artifact)来设置特定的工件(您的 *.war 文件):

You can tell the EB CLI to deploy a ZIP or WAR file that you generate as part of a separate build process by adding the following lines to .elasticbeanstalk/config.yml in your project folder.

deploy:   
artifact: path/to/buildartifact.zip

关于amazon-web-services - 如果您不使用 git,有没有办法部署到 Elastic Beanstalk?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33825199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com