Hey guys. I am experimenting to see if it is possible to start multiple bots (listening to different port) by simple executing one docker-compose.
However I met a problem: I found that in the base Docker image (for example: Docker Hub), it s already allocated a port by EXPOSE, which is 5005. And I dont know how to override it in docker-compose.yml. This would be a problem if I run two bots in the same docker-compose, the error is:
ERROR: for mq-bot_action_server Cannot start service mq-bot_action_server: driver failed programming external connectivity on endpoint all-in-one_mq-bot_action_server_1 (3671e9d372612e4f9283a18bcd82f14930801b75a68488e40135ba26b8103fab): Bind for 0.0.0.0:5055 failed: port is already allocated
Did anyone successfully run multiple bot in one docker-compose before? Or is this even a right direction?
Have you tried perhaps setting the ports on the ‘rasa run’ command option for each bot service? So each server will start on the ports you want, instead of the default 5005. Like this (just replacing the --p values):
mq-bot:
image: rasa/rasa:latest-full
volumes:
- ./mq-bot:/app
command: rasa run --p 5006
It might help when wanting to use different ports from what was exposed previously.
Hope it helps!
So if you take a look you will find it pre-defined the port. To change the port, just override the CMD. For rasa/rasa, it is run -p 5006, for rasa-sdk, it is start --actions actions.actions -p 5056
Hello, how did you organize your project in the /etc/ ? do you have separate folder for each bot project or ? if thats the case where did you run the docker compose