I run rasa in a docker container using docker compose on port 5005, and my app locally on localhost:8000. I recently added callback by adding a credentials.yml with this:
callback: url: "http://localhost:8000/bot"
My docker compose looks like this for rasa:
rasa: build: "./chatbot/" image: chatbot-rasa:latest ports: - "5005:5005"
When I run rasa from terminal instead of in a docker, it works fine, but when I use docker, I get an Error:
Exception occurred while handling uri: 'http://localhost:5005/webhooks/callback/webhook' Traceback (most recent call last): ... ConnectionRefusedError: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): ... aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8000 ssl:default [Connection refused]
I guess Rasa cant make POST requests to localhost:8000 from inside the container for some reason. Any idea why? When i wasn’t using callback and all it had to do was reply to requests, it worked fine.