Hi @yassine.lamarti @ahnineamine @_sanjay_r @losimons @cityhunter25197
Apologies on responding on this very late. As they say… better late than never
I still have my reservations on using heroku for this but I have seen that there are a number of people exploring this route so here are some steps that can help you
Steps to create bot using docker and deploy on heroku
-
Create a docker image using a docker file with the text below and the command: docker build -t chat_bot:v1 .
FROM rasa/rasa:1.10.3-full
USER root
RUN apt-get update -qq
WORKDIR /app
ADD . .
ENTRYPOINT []
USER 1001
CMD $(echo “rasa run -p $PORT -m models --credentials credentials.yml --enable-api --log-file out.log --endpoints endpoints.yml” | sed ‘s/=//’)
-
Create a project using the new image using the command:
docker run -v /c/Temp/bot:/app chat_bot:v1 rasa init --no-prompt
-
At this point you can make changes to your bot (add stories\intents etc) and to run and train the bot after making the changes you can train the bot using the command:
docker run -v /c/Temp/bot:/app chat_bot:v1 rasa train --domain domain.yml --data data --out models
-
To see your bot in action, you use the command:
docker run -it -v /c/Temp/bot:/app chat_bot:v1 rasa shell
-
Now lets deploy to heroku. Assuming you already have a heroku acc and the cli installed)
a. heroku login
b. heroku container:login
c. heroku create * this creates the app that will be used by the docker
d. heroku container:push web --app xxxxxxxxx * xxxxxxxxx is the name of the heroku app that was created in step c
e. heroku container:release web --app xxxxxxxxx * this is what starts the heroku app
f. heroku logs --tail --app xxxxxxxxx * run this to confirm that the bot is up and running.
This is it… let me know if you have any questions
Cheers
Simba