Update docs
This commit is contained in:
parent
e32488e23b
commit
b39d8b8ca5
|
@ -90,7 +90,7 @@ Component libraries are collections of components as well as the definition of t
|
||||||
|
|
||||||
#### 1. Prerequisites
|
#### 1. Prerequisites
|
||||||
|
|
||||||
- NodeJS version `20.x.x`
|
- NodeJS version `22.x.x`
|
||||||
- Python version `3.x`
|
- Python version `3.x`
|
||||||
|
|
||||||
### Using asdf (recommended)
|
### Using asdf (recommended)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Docker Single Image for Budibase
|
# Docker Single Image for Budibase
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
As an alternative to running several docker containers via docker-compose, the files under ./hosting/single can be used to build a docker image containing all of the Budibase components (minio, couch, clouseau etc).
|
As an alternative to running several docker containers via docker-compose, the files under ./hosting/single can be used to build a docker image containing all of the Budibase components (minio, couch, clouseau etc).
|
||||||
We call this the 'single image' container as the Dockerfile adds all the components to a single docker image.
|
We call this the 'single image' container as the Dockerfile adds all the components to a single docker image.
|
||||||
|
|
||||||
|
@ -18,11 +19,15 @@ The CUSTOM_DOMAIN variable will be used to request a certificate from LetsEncryp
|
||||||
If you have other arrangements for a proxy in front of the single image container you can omit the CUSTOM_DOMAIN environment variable and the request to LetsEncrypt will be skipped. You can then point traffic to port 80.
|
If you have other arrangements for a proxy in front of the single image container you can omit the CUSTOM_DOMAIN environment variable and the request to LetsEncrypt will be skipped. You can then point traffic to port 80.
|
||||||
|
|
||||||
### Build Requirements
|
### Build Requirements
|
||||||
|
|
||||||
We would suggest building the image with 6GB of RAM and 20GB of free disk space for build artifacts. The resulting image size will use approx 2GB of disk space.
|
We would suggest building the image with 6GB of RAM and 20GB of free disk space for build artifacts. The resulting image size will use approx 2GB of disk space.
|
||||||
|
|
||||||
### Build the Image
|
### Build the Image
|
||||||
|
|
||||||
The guidance below is based on building the Budibase single image on Debian 11 and AlmaLinux 8. If you use another distro or OS you will need to amend the commands to suit.
|
The guidance below is based on building the Budibase single image on Debian 11 and AlmaLinux 8. If you use another distro or OS you will need to amend the commands to suit.
|
||||||
|
|
||||||
#### Install Node
|
#### Install Node
|
||||||
|
|
||||||
Budibase requires a more recent version of node (14+) than is available in the base Debian repos so:
|
Budibase requires a more recent version of node (14+) than is available in the base Debian repos so:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -30,10 +35,13 @@ curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
||||||
apt install -y nodejs
|
apt install -y nodejs
|
||||||
node -v
|
node -v
|
||||||
```
|
```
|
||||||
|
|
||||||
Install yarn and lerna:
|
Install yarn and lerna:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install -g yarn jest lerna
|
npm install -g yarn jest lerna
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install Docker
|
#### Install Docker
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -42,45 +50,60 @@ apt install -y docker.io
|
||||||
|
|
||||||
Check the versions of each installed version. This process was tested with the version numbers below so YMMV using anything else:
|
Check the versions of each installed version. This process was tested with the version numbers below so YMMV using anything else:
|
||||||
|
|
||||||
- Docker: 20.10.5
|
- Docker: 22.11.0
|
||||||
- node: 16.15.1
|
- node: 16.15.1
|
||||||
- yarn: 1.22.19
|
- yarn: 1.22.19
|
||||||
- lerna: 5.1.4
|
- lerna: 5.1.4
|
||||||
|
|
||||||
#### Get the Code
|
#### Get the Code
|
||||||
|
|
||||||
Clone the Budibase repo
|
Clone the Budibase repo
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/Budibase/budibase.git
|
git clone https://github.com/Budibase/budibase.git
|
||||||
cd budibase
|
cd budibase
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Setup Node
|
#### Setup Node
|
||||||
|
|
||||||
Node setup:
|
Node setup:
|
||||||
|
|
||||||
```
|
```
|
||||||
node ./hosting/scripts/setup.js
|
node ./hosting/scripts/setup.js
|
||||||
yarn
|
yarn
|
||||||
yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Build Image
|
#### Build Image
|
||||||
|
|
||||||
The following yarn command does some prep and then runs the docker build command:
|
The following yarn command does some prep and then runs the docker build command:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn build:docker:single
|
yarn build:docker:single
|
||||||
```
|
```
|
||||||
|
|
||||||
If the docker build step fails try running that step again manually with:
|
If the docker build step fails try running that step again manually with:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build --build-arg TARGETARCH=amd --no-cache -t budibase:latest -f ./hosting/single/Dockerfile .
|
docker build --build-arg TARGETARCH=amd --no-cache -t budibase:latest -f ./hosting/single/Dockerfile .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Azure App Services
|
#### Azure App Services
|
||||||
|
|
||||||
Azure have some specific requirements for running a container in their App Service. Specifically, installation of SSH to port 2222 and data storage under /home. If you would like to build a budibase container for Azure App Service add the build argument shown below setting it to 'aas'. You can remove the CUSTOM_DOMAIN env variable from the Dockerfile too as Azure terminate SSL before requests reach the container.
|
Azure have some specific requirements for running a container in their App Service. Specifically, installation of SSH to port 2222 and data storage under /home. If you would like to build a budibase container for Azure App Service add the build argument shown below setting it to 'aas'. You can remove the CUSTOM_DOMAIN env variable from the Dockerfile too as Azure terminate SSL before requests reach the container.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build --build-arg TARGETARCH=amd --build-arg TARGETBUILD=aas -t budibase:latest -f ./hosting/single/Dockerfile .
|
docker build --build-arg TARGETARCH=amd --build-arg TARGETBUILD=aas -t budibase:latest -f ./hosting/single/Dockerfile .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run the Container
|
### Run the Container
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d -p 80:80 -p 443:443 --name budibase budibase:latest
|
docker run -d -p 80:80 -p 443:443 --name budibase budibase:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
- -d runs the container in detached mode
|
- -d runs the container in detached mode
|
||||||
- -p forwards ports from your host to the ports inside the container. If you are already using port 80 on your host for something else you can try running with an alternative port e.g. `-p 8080:80`
|
- -p forwards ports from your host to the ports inside the container. If you are already using port 80 on your host for something else you can try running with an alternative port e.g. `-p 8080:80`
|
||||||
- --name is the name for the container as shown in `docker ps` and can be used with other docker commands e.g. `docker restart budibase`
|
- --name is the name for the container as shown in `docker ps` and can be used with other docker commands e.g. `docker restart budibase`
|
||||||
|
@ -90,21 +113,28 @@ When the container runs you should be able to access the container over http at
|
||||||
When the Budibase UI appears you will be prompted to create an account to get started.
|
When the Budibase UI appears you will be prompted to create an account to get started.
|
||||||
|
|
||||||
### Podman
|
### Podman
|
||||||
|
|
||||||
The single image container builds fine when using podman in place of docker. You may be prompted for the registry to use for the CouchDB image and the HEALTHCHECK parameter is not OCI compliant so is ignored.
|
The single image container builds fine when using podman in place of docker. You may be prompted for the registry to use for the CouchDB image and the HEALTHCHECK parameter is not OCI compliant so is ignored.
|
||||||
|
|
||||||
### Check
|
### Check
|
||||||
|
|
||||||
There are many things that could go wrong so if your container is not building or running as expected please check the following before opening a support issue.
|
There are many things that could go wrong so if your container is not building or running as expected please check the following before opening a support issue.
|
||||||
Verify the healthcheck status of the container:
|
Verify the healthcheck status of the container:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker ps
|
docker ps
|
||||||
```
|
```
|
||||||
|
|
||||||
Check the container logs:
|
Check the container logs:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker logs budibase
|
docker logs budibase
|
||||||
```
|
```
|
||||||
|
|
||||||
### Support
|
### Support
|
||||||
|
|
||||||
This single image build is still a work-in-progress so if you open an issue please provide the following information:
|
This single image build is still a work-in-progress so if you open an issue please provide the following information:
|
||||||
|
|
||||||
- The OS and OS version you are building on
|
- The OS and OS version you are building on
|
||||||
- The versions you are using of docker, docker-compose, yarn, node, lerna
|
- The versions you are using of docker, docker-compose, yarn, node, lerna
|
||||||
- For build errors please provide zipped output
|
- For build errors please provide zipped output
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Docker Image for Running Budibase Tests
|
# Docker Image for Running Budibase Tests
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This image contains the basic setup for running
|
This image contains the basic setup for running
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -8,10 +9,12 @@ This image contains the basic setup for running
|
||||||
- Build the Image
|
- Build the Image
|
||||||
- Run the Container
|
- Run the Container
|
||||||
|
|
||||||
|
|
||||||
### Build the Image
|
### Build the Image
|
||||||
|
|
||||||
The guidance below is based on building the Budibase single image on Debian 11 and AlmaLinux 8. If you use another distro or OS you will need to amend the commands to suit.
|
The guidance below is based on building the Budibase single image on Debian 11 and AlmaLinux 8. If you use another distro or OS you will need to amend the commands to suit.
|
||||||
|
|
||||||
#### Install Node
|
#### Install Node
|
||||||
|
|
||||||
Budibase requires a more recent version of node (14+) than is available in the base Debian repos so:
|
Budibase requires a more recent version of node (14+) than is available in the base Debian repos so:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -19,10 +22,13 @@ curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
||||||
apt install -y nodejs
|
apt install -y nodejs
|
||||||
node -v
|
node -v
|
||||||
```
|
```
|
||||||
|
|
||||||
Install yarn and lerna:
|
Install yarn and lerna:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install -g yarn jest lerna
|
npm install -g yarn jest lerna
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install Docker
|
#### Install Docker
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -31,26 +37,34 @@ apt install -y docker.io
|
||||||
|
|
||||||
Check the versions of each installed version. This process was tested with the version numbers below so YMMV using anything else:
|
Check the versions of each installed version. This process was tested with the version numbers below so YMMV using anything else:
|
||||||
|
|
||||||
- Docker: 20.10.5
|
- Docker: 22.11.0
|
||||||
- node: 16.15.1
|
- node: 16.15.1
|
||||||
- yarn: 1.22.19
|
- yarn: 1.22.19
|
||||||
- lerna: 5.1.4
|
- lerna: 5.1.4
|
||||||
|
|
||||||
#### Get the Code
|
#### Get the Code
|
||||||
|
|
||||||
Clone the Budibase repo
|
Clone the Budibase repo
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/Budibase/budibase.git
|
git clone https://github.com/Budibase/budibase.git
|
||||||
cd budibase
|
cd budibase
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Setup Node
|
#### Setup Node
|
||||||
|
|
||||||
Node setup:
|
Node setup:
|
||||||
|
|
||||||
```
|
```
|
||||||
node ./hosting/scripts/setup.js
|
node ./hosting/scripts/setup.js
|
||||||
yarn
|
yarn
|
||||||
yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Build Image
|
#### Build Image
|
||||||
|
|
||||||
The following yarn command does some prep and then runs the docker build command:
|
The following yarn command does some prep and then runs the docker build command:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn build:docker:dependencies
|
yarn build:docker:dependencies
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue