Manual w/ docker run

We strongly recommend not to use this installation option, unless you don't have any other option. In most of cases, you should go with docker compose installation option since it is much easier for initial setup and further maintenance.

Prerequisites

  • Install docker 20.10.11 version or higher

  • Create a directory for on-premise configuration files and download setup script:

    mkdir ui-bakery-on-premise && cd ui-bakery-on-premise && curl -k -L -o setup.sh https://raw.githubusercontent.com/uibakery/self-hosted/main/setup.sh
  • Run the setup.sh script to create .env file with required environmental variables: ./setup.sh

Installation

Pulling container images

First of all, pull all the docker images from UI Bakery's Docker container repository.

docker pull cruibakeryonprem.azurecr.io/cloud/gateway:latest &&\
docker pull cruibakeryonprem.azurecr.io/cloud/bakery-front:latest &&\
docker pull cruibakeryonprem.azurecr.io/cloud/workbench-front:latest &&\
docker pull cruibakeryonprem.azurecr.io/cloud/datasource:latest &&\
docker pull cruibakeryonprem.azurecr.io/cloud/datasource:python-runtime &&\
docker pull cruibakeryonprem.azurecr.io/cloud/bakery-back:latest &&\
docker pull cruibakeryonprem.azurecr.io/cloud/automation:latest &&\
docker pull mysql:8.0

Note, that you might not need Mysql image in case you are using an external database.

Creating a Docker network for images

docker network create ui-bakery-on-premise

This network will be later used by containers to communicate with each other.

Starting containers one by one

In order to start the UI Bakery containers and run them one by one, use the following commands.

db (Internal UI Bakery database)

Used for storing user accounts and project metadata (not needed if an external database is used):

docker run -d \
  --name db \
  --restart always \
  --platform linux/amd64 \
  --cap-add SYS_NICE \
  --env-file .env \
  -e MYSQL_DATABASE=bakery \
  -e MYSQL_USER=bakery \
  -e MYSQL_PASSWORD=bakery \
  -e MYSQL_ROOT_PASSWORD=root \
  -v my-db:/var/lib/mysql \
  --health-cmd 'mysql -h localhost -u bakery --password=bakery -e "select 1"' \
  --health-timeout 1s \
  --health-interval 10s \
  --health-retries 10 \
  --network=ui-bakery-on-premise \
  mysql:8.0 --default-authentication-plugin=mysql_native_password

bakery-back

Bakery backend which is responsible for storing user accounts, project metadata, etc.

docker run -d \
  --name bakery-back \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/bakery-back:latest

workbench-front

UI Bakery end-user frontend:

docker run -d \
  --name workbench-front \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/workbench-front:latest

bakery-front

UI Bakery developer and workspace frontend:

docker run -d \
  --name bakery-front \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/bakery-front:latest

datasource

UI Bakery data source connection middleware:

docker run -d \
  --name datasource \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/datasource:latest

python-runtime

UI Bakery python backend code middleware:

docker run -d \
  --name python-runtime \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/python-runtime:latest

automation

UI Bakery module for creating scheduled jobs and webhooks:

docker run -d \
  --name automation \
  --env-file .env \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/automation:latest

gateway

An entry point for all UI Bakery client requests:

docker run -d \
  --name gateway \
  --env-file .env \
  -p ${UI_BAKERY_PORT:-3030}:3030 \
  --restart always \
  --network=ui-bakery-on-premise \
  cruibakeryonprem.azurecr.io/cloud/gateway:latest

Updating to the newer version

Pull the new container versions using the command specified above. You can also pull a specific version by changing the :latest tag to the version that you need.

Stop running containers:

docker stop gateway automation datasource python-runtime bakery-front workbench-front bakery-back

Remove the containers:

docker rm gateway automation datasource python-runtime bakery-front workbench-front bakery-back

Restart all the containers except Mysql (db) as defined in the section above.

Last updated