首页 > 解决方案 > AWS EB 部署错误:AppDeployEnactHook/03start-task.sh:活动失败

问题描述

我一直在尝试以最简单的方式将多容器 Docker 环境部署到 AWS Elastic Beanstalk。我已将创建构成 docker-compose.yml 的容器的 docker 映像上传到各个公共 Docker 集线器存储库(例如,*myusername/production_app、myusername/production_celery、myusername/postgres、myusername/production_client)。

“docker-compose up”成功运行(docker-compose 日志中没有错误)

接下来,我基于我的 docker-compose.yml 创建以下 Dockerrun.aws.json,创建了一个新的 Elastic Beanstalk 应用程序,并在创建 Web 服务器环境时继续上传此文件。

但是,应用程序无法部署并出现以下错误:

XXXX/StartupStage1/AppDeployEnactHook/03start-task.sh]:活动失败。

Dockerrun.aws.json

{
 "AWSEBDockerrunVersion": 2,
 "containerDefinitions": [
    {
      "name": "app",
      "image": "myusername/production_app",
      "essential": true,
      "memoryReservation": 200,
      "portMappings": [
        {
          "hostPort": 5000,
          "containerPort": 5000
        }
    },
    {
      "name": "celery",
      "image": "myusername/production_celery",
      "essential": true,
      "memoryReservation": 200,
    },
     {
      "name": "client",
      "image": "myusername/production_client",
      "essential": true,
      "memoryReservation": 200,
       "portMappings": [
        {
          "hostPort": 3007,
          "containerPort": 3000
        }
      ]
    },
    {
      "name": "postgres",
      "image": "myusername/postgres",
      "essential": true,
      "memoryReservation": 200,
       "portMappings": [
        {
          "hostPort": 5432,
          "containerPort": 5432
        }
      ]
    }
 ]
}

标签: amazon-web-servicesdockerdocker-composeamazon-elastic-beanstalk

解决方案


推荐阅读