Last active
April 14, 2021 17:11
-
-
Save slvnperron/6b932bd4ce285588524d63b46e4842d2 to your computer and use it in GitHub Desktop.
Installing Botpress on vanilla Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source env.sh | |
docker rm -f redis || true | |
docker rm -f bp || true | |
docker run --restart=always -p=6379 --name=redis -d redis | |
docker run -d \ | |
--name bp \ | |
-p 3000:3000 \ | |
-v botpress_data:/botpress/data \ | |
--restart=always \ | |
--link=redis \ | |
-e PRO_ENABLED=true \ | |
-e EXTERNAL_URL="$BP_EXTERNAL_URL" \ | |
-e DATABASE_URL="$BP_DATABASE_URL" \ | |
-e BP_LICENSE_KEY="$BP_LICENSE" \ | |
-e BP_MODULES_PATH='/botpress/modules:/botpress/data/custom_modules' \ | |
-e REDIS_URL="$BP_REDIS_URL" \ | |
-e CLUSTER_ENABLED=true \ | |
-e BPFS_STORAGE="database" \ | |
-e BP_MODULE_NLU_DUCKLINGURL='http://localhost:8000' \ | |
botpress/server:$BP_VERSION \ | |
bash -c "./duckling & ./bp --auto-migrate" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 18.04 | |
# Step 1. Installing Docker | |
# ------------------------- | |
# Reference: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04 | |
sudo apt update && \ | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && \ | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \ | |
sudo apt update && \ | |
apt-cache policy docker-ce && \ | |
sudo apt install docker-ce -y && \ | |
sudo systemctl status docker | tail -n100 && \ | |
sudo usermod -aG docker ${USER} | |
# Step 2. Configure Botpresss | |
# ----------------------------- | |
wget -O start-botpress.sh https://gist.githubusercontent.com/slvnperron/6b932bd4ce285588524d63b46e4842d2/raw/b63c06b068430c92f0121400a0539a9279012f7f/start-botpress.sh && \ | |
echo "export BP_DATABASE_URL='postgresql://user:[email protected]:25060/database?sslmode=require&ssl=true'" > env.sh && \ | |
echo "export BP_EXTERNAL_URL='https://your-bot.domain.com'" >> env.sh && \ | |
echo "export BP_LICENSE='your license key'" >> env.sh && \ | |
echo "export BP_VERSION='v12_1_1'" >> env.sh && \ | |
echo "export BP_REDIS_URL='redis://redis:6379'" >> env.sh && \ | |
chmod +x start-botpress.sh env.sh | |
# Step 3. Configure Botpress | |
# ------------------------------ | |
nano env.sh | |
# Step 4. Launch Botpress Docker | |
# ------------------------------ | |
./start-botpress.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment