Dockerrun.aws.json file example

I would very much appreciate an example Dockerrun.aws.json file for a docker-compose file with an local entry like

services: rasa: image: rasa/rasa:latest-full

action_server: image: rasa/rasa-sdk:latest volumes: - ./actions:/app/actions

Hey @nicholasbulka. At the moment we don’t have it, but it would be very nice contribution from the community if someone made one. I will also make a note of this request :slight_smile:

I got one to work after some trial and error. One key thing to note is the fact that it seemed that I had to specify the -m models command to the rasa run command for Elastic Beanstalk to recognize the mounted directory. Here’s what worked for me, using a very similar directory structure to what rasa init would provide.

{
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
    {
      "name": "rasa",
      "image": "rasa/rasa:latest-full",
      "essential": true,
      "memory": 900,
      "memoryReservation": 300,
      "command": [
        "run",
        "-m",
        "models",
        "--log-file",
        "serverlog.log",
        "--cors",
        "*",
        "-vv"
      ],
      "mountPoints": [
        {
          "containerPath": "/app",
          "sourceVolume": "Rasa"
        },
        {
          "containerPath": "/app/models",
          "sourceVolume": "Models"
        }
      ],
      "portMappings": [
        {
          "containerPort": 5005,
          "hostPort": 80
        }
      ],
      "links": [
        "action_server"
      ]
    },
    {
      "name": "action_server",
      "image": "rasa/rasa-sdk:latest",
      "essential": true,
      "memory": 90,
      "memoryReservation": 30,
      "mountPoints": [
        {
          "containerPath": "/app/actions",
          "sourceVolume": "Actions"
        },
        {
          "containerPath": "/app/data",
          "sourceVolume": "Data"
        }
      ],
      "portMappings": [
        {
          "containerPort": 5055,
          "hostPort": 5055
        }
      ]
    }
  ],
  "volumes": [
    {
      "host": {
        "sourcePath": "/var/app/current"
      },
      "name": "Rasa"
    },
    {
      "host": {
        "sourcePath": "/var/app/current/actions"
      },
      "name": "Actions"
    },
    {
      "host": {
        "sourcePath": "/var/app/current/data"
      },
      "name": "Data"
    },
    {
      "host": {
        "sourcePath": "/var/app/current/models"
      },
      "name": "Models"
    }
  ]
}
1 Like