Rasa docker connecting to another docker API not working

Hi, I have a Rasa server and actions server in a single docker. I am able to send requests using HTTP API from my website. I want Rasa docker to send REST API requests to another docker installed on the same server ,using the docker container name instead of a hostname or domain name but this is not working.

My endpoints.yml file: #action_endpoint: url: “http://mydocker:5005/webhook#action server api_url: “http://apidocker:1234/#apidocker is name of another container

Thanks in advance!

Hello,

You are trying to configure your Rasa server to send REST API requests to another Docker container using the container name. Make sure both Docker containers are on the same Docker network. You can create a custom network and connect both containers to it. For example: docker network create mynetwork docker run --network mynetwork --name mydocker … docker run --network mynetwork --name apidocker … Verify that the container names (mydocker and apidocker) are correctly specified in your endpoints.yml file.your endpoints.yml file is correctly configured. It should look ReadTheory something like this: action_endpoint: url: “http://mydocker:5005/webhook” api_url: url: “http://apidocker:1234/” From within the Rasa container, try to ping the apidocker container to ensure they can communicate: docker exec -it mydocker ping apidocker Review the logs of both containers to identify any errors or issues that might be preventing the connection. You can check the logs using: docker logs mydocker docker logs apidocker.

Best Regard, Faruk