Hi all. I want to use both rasa shell and action server, with each running as docker container instances. However I’m stumped at how to get it to work. Any help appreciated. Thanks.
I’m starting the containers with the following commands:
docker run -it -v ${PWD}:/app -v ${PWD}/.config:/.config -p 5005:5005 rasa/rasa:2.0.0-full shell --debug --endpoints endpoints.yml
docker run -it -v ${PWD}:/app -v ${PWD}/.config:/.config -p 5055:5055 rasa/rasa:2.0.0-full run actions --debug --cors "*"
endpoints.yml
reads as follows:
action_endpoint:
url: "http://localhost:5055/webhook"
Shell works fine without custom actions, and I can separately test the action server container instance using curl. However: the shell container can’t connect to the action container when it tries to run my custom action, reporting the following error:
Failed to run custom action 'action_estimate_life_expectancy'. Couldn't connect to the server at 'http://localhost:5055/webhook'. Is the server running?
I tried starting them both using docker-compose
with the docker-compose.yml
file below. They both start, but the rasa-bot
container reports:
WARNING: your terminal doesn't support cursor position requests (CPR).
Then doesn’t show any bot prompts or echo any inputs (not sure if it’s reading them or not). I’m running in powershell on windows 10.
I don’t mind whether the solution uses docker-compose
or not at this stage; just want to get things running. Thanks.
–
docker-compose.yml
:
version: '3.0'
services:
rasa:
container_name: rasa-bot
image: rasa/rasa:2.0.0-full
stdin_open: true # docker run -i
tty: true # docker run -t
networks: ['rasa-network']
ports:
- "5005:5005"
volumes:
- "./:/app"
- "./.config:/.config"
command:
- shell
- --debug
- --endpoints
- endpoints.yml
- --cors
- "*"
depends_on:
- action_server
action_server:
container_name: rasa-action-server
image: rasa/rasa:2.0.0-full
networks: ['rasa-network']
ports:
- "5055:5055"
volumes:
- "./actions:/app/actions"
- "./.config:/.config"
command:
- run
- actions
- --cors
- "*"
networks: {rasa-network: {}}