Issues with Botfront Rasa App while deploying with docker

I am having issues with running a rasa chatbot flask app in docker. I have used botfront script in index.html to make a flask app that will give a GUI for my rasa chatbot. The chatbot I am trying to implement right now is just the basic rasa init chatbot. I am facing some issues when running the docker-compose up command.


To run rasa flask app via docker.

Current Issue

The app server is shown as running, but it is not visible on the mentioned address.


Starting rasa-chat-app … done

Starting rasa-chatbot-server … done

Attaching to rasa-chat-app, rasa-chatbot-server

rasa-chat-app | * Serving Flask app ‘app’ (lazy loading)

rasa-chat-app | * Environment: production

rasa-chat-app | WARNING: This is a development server. Do not use it in a production deployment.

rasa-chat-app | Use a production WSGI server instead.

rasa-chat-app | * Debug mode: on

rasa-chat-app | * Running on all addresses.

rasa-chat-app | WARNING: This is a development server. Do not use it in a production deployment.

rasa-chat-app | * Running on (Press CTRL+C to quit)

rasa-chat-app | * Restarting with stat

rasa-chat-app | * Debugger is active!

rasa-chat-app | * Debugger PIN: 143-584-386

rasa-chatbot-server | Matplotlib created a temporary config/cache directory at /tmp/matplotlib-e9aqxszg because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.

rasa-chatbot-server | 2021-07-06 07:37:38 WARNING rasa.utils.common - Failed to write global config. Error: [Errno 13] Permission denied: ‘/.config’. Skipping.

rasa-chatbot-server | 2021-07-06 07:37:38 INFO root - Starting Rasa server on http://localhost:5005

rasa-chatbot-server | 2021-07-06 07:37:38 INFO rasa.model - Loading model models/20210425-161726.tar.gz…

rasa-chatbot-server | 2021-07-06 07:37:50 INFO root - Rasa server is up and running.

rasa-chat-app | - - [06/Jul/2021 08:19:51] “GET / HTTP/1.1” 200 -

rasa-chat-app | - - [06/Jul/2021 08:19:51] “GET /favicon.ico HTTP/1.1” 404 -


Docker-compose file

version: '2' services:   rasa-flask:
    image: rasa-chatbot:latest
      context: .
      dockerfile: Dockerfile
    container_name: rasa-chat-app
      - .:/rasa_app
      - 5000:5000
    command: python3   rasa-server:
    image: rasa/rasa:2.1.2-full
    container_name: rasa-chatbot-server
      - .:/app
      - 5005:5005
    command: run -m models --enable-api --cors "*"


FROM tensorflow/tensorflow:2.2.0
RUN mkdir -p /rasa_app
WORKDIR /rasa_app
COPY . /rasa_app
RUN python -m pip install -U pip
RUN pip3 install -r requirements.txt
#RUN pip3 install --user rasa-nlu==0.14.0
#RUN pip3 install --user rasa-core==0.13.2
RUN python -m spacy download en
RUN pip3 install --user rasa==2.1.2
RUN pip3 install --user sanic==19.9.0

Flask App file

from flask import Flask  
from flask import render_template

# creates a Flask application, named app
app = Flask(__name__, static_url_path='/static')

# a route to display our html page gotten from [react-chat-widget](
def index():  
    return render_template('index.html')

# run the application
if __name__ == "__main__":"", port="8000", debug=True)

HTML file

<!doctype html>
    <script>!(function () {
  let e = document.createElement("script"),
    t = document.head || document.getElementsByTagName("head")[0];
  (e.src =
    // Replace 1.x.x with the version that you want
    (e.async = !0),
    (e.onload = () => {
          customData: { language: "en" },
          socketUrl: "http://localhost:5005",
          // add other props here
    t.insertBefore(e, t.firstChild);

@Jainil-Gosalia Heya! Few questions for you If you don’t mind? The same process are you able to run locally using RASA+Rasa actions server+ Botfront(rasawebchat)+Flask without docker image or docker-compose? Thanks

Hi @nik202 I am able to run it in locally but my UI is chatroom.

hi @Jainil-Gosalia were you able to run the flask in docker?