我正在尝试将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模板并再次部署。然后,我部署该应用程序。错误仍然存在。我该如何解决?