Botfront comes as a collection of services delivered as Docker images that you need to orchestrate so they can work together. You have different options.
Orchestration framework (recommended)
Deploying on Kubernetes, Openshift or Swarm is by far the best option if you are familiar with one of them, especially if you are running it in production.
An alternative option is to deploy all the services on a single machine with Docker installed. The easiest option is then to run Botfront with Docker compose and you can easily re-use the
docker-compose.yaml file in the
.botfront directory on your project.
Note that using docker-compose in production is generally not recommended as a best practice.
Services and Docker images
The table below lists all the services that can be used with Botfront.
|actions||Build your own|
It is not recommended to deploy the images witout tags or with the
latest tag. Look in the
.botfront.yml for the tags corresponding to the version of Botfront you are using.
Duckling (a structured entity parser developed by Facebook) is not strictly required if your NLU pipeline doesn't use it.
Also, be very careful with your choice regarding MongoDB. If you decide to just run it as a container, be sure to at least properly mount the volume on a physical disk (otherwise all your data will be gone when the container is destroyed) and seriously consider scheduling back-ups on a regular basis.
Using a hosted service such as MongoDB Atlas is highly recommended, some of them even include a free plan that will be more than enough for small projects.
The following table shows the environment variables required by each service. Be sure to make those available as arguments or in the manifest files of your deployment
|Environment variable||Description||Required by|
| ||The Botfront app URL (e.g. https://botfront.your.domain)|
| ||The mongoDB connection string (e.g. |
| ||The mongoDB Oplog connection string|
| ||An SMTP url if you want to use the password reset feature|
| ||The Botfront project ID (typically |
| ||The |
| ||Where the trained model returned by Rasa is stored locally. Defaults to |
Although volumes are technically not required for Botfront to run and work, if you do not mount them your data will be gone when containers are destroyed.
| ||Where Botfront stores the model retured by Rasa when the training is completed|
| ||Where Rasa loads a model from when it starts|
| ||Where MongoDB persists your data|
/app/models should be mounted on the same location so when Rasa restarts it can load the latest trained model.
MongoDB database considerations
It is highly recommended (but optional) to provide an oplog url with
MONGO_OPLOG_URL. This will improve the reactivity of the platform as well as reduce the network throughput between MongoDB and Botfront.
IMPORTANT: choose a very short database name
Choose a very short database name (e.g
bf) and not too long response names to avoid hitting the limits.
Indicative technical requirements
Those are the minimal requirements:
|rasa (supervised_embeddings)||1 Gb||1|