Skip to main content

DigitalOcean


Prerequisite

Instructions

  1. Create a new Load Balancer

    • Forwarding Rules: HTTPS 443 -> HTTP 3000 (define the pre-requisite certificate created earlier). It is also possible to use Passthrough if you setup NGINX to redirect HTTPS requests.
    • Health Checks: You might want to set those numbers lower.
    • Sticky Sessions: Enabled.
  2. Create a droplet (Ubuntu 20.04) for your Redis instance

    • Update the bind settings so your BP nodes can reach it.
    • Secure it with a strong password.
  3. Create a droplet (Ubuntu 20.04) for your Postgres instance

    • Define a password for your Postgres user.
    • Make it accessible by each BP nodes.
    • Create a new database.
  4. Create a droplet (Ubuntu Docker 18.06) for each BP node you want to use. You will use the first one to configure our cluster's database and licensing.

  5. Create a server.yml file and upload it on the first droplet. This file identifies which Docker image you will use and sets the required environment variables.

version: '3.5'

services:
botpress:
image: botpress/server:$TAG
environment:
- BP_CONFIG_PRO_ENABLED=true
- CLUSTER_ENABLED=true
- BP_CONFIG_PRO_LICENSEKEY=<license_key>
- EXTERNAL_URL=https://yourbot.yourhostname.com
- DATABASE_URL=postgres://user:[email protected]/dbName
- REDIS_URL=redis://host:port
command: './bp'
ports:
- '3000:3000'
  1. Upload the file server.yml file on each node created in step 4.

  2. Run the command docker-compose -f server.yml up -d on each node, and your Botpress Cluster is ready!