Deployment in nodejs website

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!!!

Have you tied using some cloud providers such as AWS, Oracle, or GCloud? Most of them have free tiers as well.

Oracle cloud Free Tier provides two servers for lifetime. I have one rasa bot running on a free tier machine (dev). The machine is easily able to handle rasa server, actions, duckling and a node app for socket.io.

PS: You cannot use Rasa-X on the Oracle free machines. I’ve tried it.

1 Like

Is there a github repo or any references that I can refer to use other cloud providers with multiple servers all at once? I am new to them. I could really use some help!

Thanks!

all cloud providers have well written docs on using virtual machines.

AWS guide

GCloud docs

Oracle docs

1 Like

Thanks! I appreciate your help! I will look into them.

You can Learn Nodejs Deployment in following Steps

STEP 1: Create a “package.json” file using the following command. … STEP 2: Create a html file “head.html” … STEP 3: Create another html file “tail.html” … STEP 4: Open “app.js” file created in step 2 and copy paste the following code in it. … STEP 5: Open the terminal again and write the following command to run the server.