Connect Rasa-X To External Channels

Hi everyone,

I have an existing rasa bot that I want to connect to Rasa-x. The bot is running in a docker container with the following configuration.

credentials.yml:

rasa:
  url: "http://localhost:5002/api"


socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: false

endpoints.yml:

action_endpoint:
  url: http://action_server:5055/webhook

The webpage uses rasa webchat and is exposed via nginx (not the one coming with rasa-x).

Now, I’m struggling to connect this bot to rasa-x, so I can gather the user input there. According to the documentation, I need to modify the endpoints. However, to me it’s not quite clear how this should be done in my case.

Moreover, how can I modify the nginx configuration within the rasa-x container so I can include my webpage? As docker-compose up will throw an error if I run it with the external nginx setup running in the background.

Thanks a lot in advance!

You don’t need to modify endpoints at the level of nginx.

What the documentation suggests is that usually if you have deploy the rasa stack using docker following Deploy on a server, you have to call the rasa bot running

as /core/webhooks//webhook

instead of the default endpoint of the bot /webhooks//webhook

to Enable a channel, you have to add them in credentials.yml

If you would like to modify the nginx endpoint or add your own docker container endpoint to it, first

docker exec -it rasa_nginx_1 bash
cat /opt/bitnami/nginx/conf/conf.d/rasax.nginx

copy the content

exit the container

now paste the content to a file called rasax.nginx

in docker-compose.override.yml add this

nginx:
    restart: always
    image: "rasa/nginx:${RASA_X_VERSION}"
    ports:
      - "80:8080"
      - "443:8443"
    volumes:
      - ./certs:/opt/bitnami/certs
      - ./terms:/opt/bitnami/nginx/conf/bitnami/terms
      - ./conf/rasaxfr.nginx:/opt/bitnami/nginx/conf/conf.d/rasaxfr.nginx
    depends_on:
      - rasa-x
      - rasa-production
      - app

this file overrides the original docker-compose.yml

the rasax.nginx file is conf file which you can then modify to add your routes for any other custom application that calls rasax that you would like to expose using the same docker network

Thanks. I managed to get it to work. For rasa webchat, the socketUrl must point to the server’s ip/url without any subpath as this is directly forwarded to rasa-production:5005

However, I only realised this after looking through the copied rasa.nginx file. I think the documentation is seriously lacking in this regard. How is one supposed to know that?