Sorry @Tobias_Wochinger , forgot I hadn’t posted the solution to this! I was able to get it fixed without much issue, but this is what my config/endpoints.yml
looks like:
nlu:
url: "http://rasa-nlu:5000/"
action_endpoint:
url: "http://action-server:5055/webhook"
and this is what my Dockerrun.aws.json
looks like now:
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "rasa-core",
"image": "rasa/rasa_core:stable",
"essential": true,
"memory": 900,
"memoryReservation": 300,
"command": [
"start",
"--core",
"model",
"-c",
"rest",
"--endpoints",
"config/endpoints.yml",
"-u",
"live/", // note the live specifier for AWS, docker-compose will point to local/
"-o",
"logs/server.log",
"-vv"
],
"mountPoints": [
{
"containerPath": "/app/model",
"sourceVolume": "Rasa_Core"
},
{
"containerPath": "/app/config",
"sourceVolume": "Config"
},
{
"containerPath": "/app/logs/",
"sourceVolume": "Rasa_Core_Logs"
}
],
"portMappings": [
{
"containerPort": 5005,
"hostPort": 80
}
],
"links": [
"rasa-nlu",
"action-server"
]
},
{
"name": "rasa-nlu",
"image": "rasa/rasa_nlu:stable-full",
"essential": true,
"memory": 300,
"memoryReservation": 100,
"command": ["start", "--path", "models", "--response_log", "logs/", "-v"],
"mountPoints": [
{
"containerPath": "/app/models/",
"sourceVolume": "Rasa_NLU"
},
{
"containerPath": "/app/logs",
"sourceVolume": "awseb-logs-rasa-nlu"
}
],
"portMappings": [
{
"containerPort": 5000,
"hostPort": 5000
}
]
},
{
"name": "action-server",
"image": "rasa/rasa_core_sdk:latest",
"essential": true,
"memory": 90,
"memoryReservation": 30,
"command": ["start", "--actions", "actions"],
"mountPoints": [
{
"containerPath": "/app/actions",
"sourceVolume": "Actions"
}
],
"portMappings": [
{
"containerPort": 5055,
"hostPort": 5055
}
]
}
],
"volumes": [
{
"host": {
"sourcePath": "/var/app/current/models/rasa_core"
},
"name": "Rasa_Core"
},
{
"host": {
"sourcePath": "/var/app/current/logs/core"
},
"name": "Rasa_Core_Logs"
},
{
"host": {
"sourcePath": "/var/app/current/config"
},
"name": "Config"
},
{
"host": {
"sourcePath": "/var/app/current/models/rasa_nlu"
},
"name": "Rasa_NLU"
},
{
"host": {
"sourcePath": "/var/app/current/actions"
},
"name": "Actions"
}
]
}
This is what my docker-compose.yml
looks like:
version: '3.0'
services:
rasa-core:
image: rasa/rasa_core:stable
ports:
- "5005:5005"
networks: ['rasa-network']
volumes:
- ./data/stories:/app/stories
- ./models/rasa_core:/app/model
- ./config:/app/config
- ./logs/core:/app/logs
- ./:/app/project
command:
- start
- --core
- model
- -c
- rest
- --endpoints
- config/endpoints.yml
- -u
- local/
- -o
- /app/logs/server.log
- -vv
depends_on:
- rasa-nlu
- action-server
rasa-nlu:
image: rasa/rasa_nlu:stable-full
volumes:
- ./models/rasa_nlu:/app/models/
- ./logs/nlu:/app/logs
- ./config:/app/config
- ./:/app/project
ports:
- "5000:5000"
networks: ['rasa-network']
command:
- start
- --path
- models
- --response_log
- logs/
- -v
action-server:
image: rasa/rasa_core_sdk:latest
volumes:
- ./actions:/app/actions
ports:
- "5055:5055"
networks: ['rasa-network']
command:
- start
- --actions
- actions
networks: {rasa-network: {}}
And this is my folder structure:
project/
├── Dockerrun.aws.json # for AWS deploy
├── docker-compose.yml # for local dev
├── domain.yml
├── policies.yml
├── actions
│ └── # some actions here
├── config
│ ├── endpoints.yml
│ └── nlu_config.yml
├── data
│ ├── nlu
│ │ └── # some NLU data here
│ └── stories
│ └── # some story data here
└── models
├── rasa_core
│ ├── live
│ │ └── # live core model here
│ └── local
│ └── # local core models here
└── rasa_nlu
├── live
| └── # live nlu model here
└── local
└── # local nlu models here
This actually might be worth adding into the documentation as a tutorial, since it’s the easiest folder structure to deploy to AWS Elastic Beanstalk with a local environment with docker-compose and live environment with AWS. I’ll see if I can find some time to create a tutorial and create a pull request.