1

我正在尝试将我的 Laravel 应用程序部署到 ElasticBeanstalk 环境中。我正在使用“eb deploy”命令进行部署。该命令工作正常。我一直在成功部署我的应用程序。在某个时候,我更新了我的 CloudFormation 模板以更改 ElasticBeanstalk 的环境名称。

然后我还更新了 .elasticbeanstalk/config.yml 文件,如下所示。

branch-defaults:
  master:
    environment: PatheinDirectoryTesting
    group_suffix: null
environment-defaults:
  MyanEat-test-env:
    branch: null
    repository: null
global:
  application_name: PatheinDirectoryApplication
  default_ec2_keyname: null
  default_platform: arn:aws:elasticbeanstalk:eu-west-1::platform/64bit Amazon Linux
    2 v3.1.0 running PHP 7.3
  default_region: eu-west-1
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: null
  sc: git
  workspace_type: Application

然后在终端中,我更新了“eb”命令以使用运行以下命令的正确环境。

eb use PatheinDirectoryTesting

然后我运行“eb deploy”来部署我的应用程序。它成功部署了 zip 文件。然后它在上传 zip 后抛出错误。

在此处输入图像描述

然后我运行“eb 日志”以获取日志中的错误。这是我在日志中发现的错误。

2020/08/29 21:42:29.413325 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:eu-west-1:733553390213:stack/awseb-e-gntnptfj8v-stack/90004470-ea3e-11ea-8e57-02d39f83e350 -r AWSEBAutoScalingGroup --regio
n eu-west-1 --configsets Infra-EmbeddedPostBuild
2020/08/29 21:42:31.691170 [ERROR] An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: Container commands build failed. Please refer to /var/log/cfn-init.log for more
 details.

我尝试删除 CloudFormation 模板并再次部署。然后我部署应用程序。错误仍然存​​在。我该如何解决?

4

0 回答 0