I have created a nodejs website and want to integrate rasa server(nlu+actions) to it as a chatbot. I am willing to dockerize them and deploy them to heroku. But I am having trouble to simultaneously run 3 servers(Rasa NLU+Rasa actions+nodejs server)
For chatbot widget I used socketio as follows:
WebChat.default.init({
selector: "#webchat",
initPayload: "/get_started",
customData: {"language": "en"},
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
title: "NAME",
subtitle: "SUBTITLE",
})
In the nodejs dockerfile:
FROM node:12
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
VOLUME /app
EXPOSE 3000
CMD [ “node”, “server.js” ]
For the rasa dockerfile:
FROM rasa/rasa:latest-full
WORKDIR /app
COPY . /app
COPY ./data /app/data
USER root
RUN pip3 install tensorflow==2.1.0 && pip3 install actions && pip3 install google && pip3 install typing==3.7.4.3 && pip3 install tweepy==3.8.0 && pip3 install beautifulsoup4==4.9.0 && pip3 install numpy==1.17.1 && pip3 install pandas==1.0.3 && pip3 install matplotlib==3.2.2 && pip3 install scipy==1.4.1 && pip3 install rasa==1.10.2 && pip3 install nltk==3.4.5
USER 1001
RUN rasa train
VOLUME /app
VOLUME /app/data
VOLUME /app/models
EXPOSE 5005
FROM rasa/rasa-sdk:latest
USER root
USER 1001
EXPOSE 5055
CMD [“rasa”,“run”,"-m","/app/models","–enable-api","–cors","*","–debug","&&",“rasa”,“run”,“actions”]
THE PROBLEM WITH HEROKU IS THERE ARE ONLY 2 SERVICES WEB and WORKER.So nodejs server is handled by WEB and for 2 rasa servers(nlu+actions) only one WORKER process is left. So I need help running both rasa servers(nlu+actions) command in one step.I used && to concatinate 2 commands in CMD command of dockerfile (as CMD allows only one command) and it happens so that one server runs only after one is terminated. I want them to run parallely by one single command
Please help!!!
I couldn’t find any help on web so far
Any other methods deploying rasa with a nodejs website are also welcome!!!