Skip to content

Deployment updates #1657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 45 additions & 9 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
default: 'latest'
options:
- latest
- stable
- test
- 2.4.6
build_allinone:
type: boolean
description: 'Build the All-In-One image'
Expand Down Expand Up @@ -41,24 +41,60 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v3
with:
version: '1.7'

- name: Set environment variables
shell: bash
run: |
# Get the short SHA of last commit
echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> "${GITHUB_ENV}"

# Get branch name - we don't use github.ref_head_name since we don't build on PRs
echo "BRANCH_NAME=${{ github.ref_name }}" >> "${GITHUB_ENV}"

# Set docker image tag
echo "IMAGE_TAG=${{ inputs.imageTag || github.ref_name }}" >> "${GITHUB_ENV}"

IMAGE_TAG=${{ inputs.imageTag || github.ref_name }}

# Check whether it's a release
LATEST_TAG=$(
curl -s -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest \
| jq -r '.tag_name'
)
IS_LATEST="false"
if [[ "${LATEST_TAG}" == "${{ github.event.release.tag_name }}" ]]; then
IS_LATEST="true"
fi;

# Control which images to build
echo "BUILD_ALLINONE=${{ inputs.build_allinone || true }}" >> "${GITHUB_ENV}"
echo "BUILD_FRONTEND=${{ inputs.build_frontend || true }}" >> "${GITHUB_ENV}"
echo "BUILD_NODESERVICE=${{ inputs.build_nodeservice || true }}" >> "${GITHUB_ENV}"
echo "BUILD_APISERVICE=${{ inputs.build_apiservice || true }}" >> "${GITHUB_ENV}"

# Image names
ALLINONE_IMAGE_NAMES=lowcoderorg/lowcoder-ce:${IMAGE_TAG}
FRONTEND_IMAGE_NAMES=lowcoderorg/lowcoder-ce-frontend:${IMAGE_TAG}
APISERVICE_IMAGE_NAMES=lowcoderorg/lowcoder-ce-api-service:${IMAGE_TAG}
NODESERVICE_IMAGE_NAMES=lowcoderorg/lowcoder-ce-node-service:${IMAGE_TAG}

if [[ "${IS_LATEST}" == "true" ]]; then
ALLINONE_IMAGE_NAMES="lowcoderorg/lowcoder-ce:latest,${ALLINONE_IMAGE_NAMES}"
FRONTEND_IMAGE_NAMES="lowcoderorg/lowcoder-ce-frontend:latest,${FRONTEND_IMAGE_NAMES}"
APISERVICE_IMAGE_NAMES="lowcoderorg/lowcoder-ce-api-service:latest,${APISERVICE_IMAGE_NAMES}"
NODESERVICE_IMAGE_NAMES="lowcoderorg/lowcoder-ce-node-service:latest,${NODESERVICE_IMAGE_NAMES}"
fi;

echo "ALLINONE_IMAGE_NAMES=${ALLINONE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
echo "FRONTEND_IMAGE_NAMES=${FRONTEND_IMAGE_NAMES}" >> "${GITHUB_ENV}"
echo "APISERVICE_IMAGE_NAMES=${APISERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
echo "NODESERVICE_IMAGE_NAMES=${NODESERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"

- name: Checkout lowcoder source
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -91,7 +127,7 @@ jobs:
linux/amd64
linux/arm64
push: true
tags: lowcoderorg/lowcoder-ce:${{ env.IMAGE_TAG }}
tags: ${{ env.ALLINONE_IMAGE_NAMES }}

- name: Build and push the frontend image
if: ${{ env.BUILD_FRONTEND == 'true' }}
Expand All @@ -108,7 +144,7 @@ jobs:
linux/amd64
linux/arm64
push: true
tags: lowcoderorg/lowcoder-ce-frontend:${{ env.IMAGE_TAG }}
tags: ${{ env.FRONTEND_IMAGE_NAMES }}

- name: Build and push the node service image
if: ${{ env.BUILD_NODESERVICE == 'true' }}
Expand All @@ -120,7 +156,7 @@ jobs:
linux/amd64
linux/arm64
push: true
tags: lowcoderorg/lowcoder-ce-node-service:${{ env.IMAGE_TAG }}
tags: ${{ env.NODESERVICE_IMAGE_NAMES }}

- name: Build and push the API service image
if: ${{ env.BUILD_APISERVICE == 'true' }}
Expand All @@ -132,5 +168,5 @@ jobs:
linux/amd64
linux/arm64
push: true
tags: lowcoderorg/lowcoder-ce-api-service:${{ env.IMAGE_TAG }}
tags: ${{ env.APISERVICE_IMAGE_NAMES }}

23 changes: 19 additions & 4 deletions deploy/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Included Dockerfile can be used to build an **all-in-one** image with all requir

For examples on running the all-in-one image or the multi image deployment see **deploy/docker/docker-compose.yaml** and **deploy/docker/docker-compose-multi.yaml**

Environment variables used to configure various aspects of the services are stored in **default.env**, **default-multi.env** and **override.env**. Look into the **default** files to see which variables can be set and what are the default values. To change the defaults, use **override.env**. You don't have to use **--env-file** parameter with **doker compose** because the files are loaded from within `docker-compose.yaml` and `docker-compose-multi.yaml`.

## all-in-one image

Expand Down Expand Up @@ -43,21 +44,27 @@ Image can be configured by setting environment variables.
| `LOWCODER_API_RATE_LIMIT` | Number of max Request per Second | `100` |
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
| `LOWCODER_NODE_SERVICE_SECRET` | Secret used for encrypting communication between API service and Node service - CHANGE IT! | |
| `LOWCODER_NODE_SERVICE_SALT` | Salt used for encrypting communication between API service and Node service - CHANGE IT! | |
| `LOWCODER_MAX_ORGS_PER_USER` | Default maximum organizations per user | `100` |
| `LOWCODER_MAX_MEMBERS_PER_ORG` | Default maximum members per organization | `1000` |
| `LOWCODER_MAX_GROUPS_PER_ORG` | Default maximum groups per organization | `100` |
| `LOWCODER_MAX_APPS_PER_ORG` | Default maximum applications per organization | `1000` |
| `LOWCODER_MAX_DEVELOPERS` | Default maximum developers | `100` |
| `LOWCODER_WORKSPACE_MODE` | SAAS to activate, ENTERPRISE to switch off - Workspaces | `SAAS` |
| `LOWCODER_EMAIL_SIGNUP_ENABLED` | Control if users create their own Workspace automatic when Sign Up | `true` |
| `LOWCODER_EMAIL_AUTH_ENABLED` | Controls whether authentication via email is enabled | `true` |
| `LOWCODER_CREATE_WORKSPACE_ON_SIGNUP` | IF LOWCODER_WORKSPACE_MODE = SAAS, controls if a own workspace is created for the user after sign up | `true` |
| `LOWCODER_MARKETPLACE_PRIVATE_MODE` | Control if not to show Apps on the local Marketplace to anonymous users | `true` |
| `LOWCODER_SUPERUSER_USERNAME` | Username of the Super-User of an Lowcoder Installation | `admin@localhost` |
| `LOWCODER_SUPERUSER_PASSWORD` | Password of the Super-User, if not present or empty, it will be generated | `generated and printed into log file |

| `LOWCODER_PLUGINS_DIR` | Directory holding lowcoder plugins | `/lowcoder-stacks/plugins` |
| `LOWCODER_COOKIE_NAME` | Name of the lowcoder application cookie | `LOWCODER_CE_SELFHOST_TOKEN` |
| `LOWCODER_COOKIE_MAX_AGE` | Lowcoder application cookie max age in hours | `24` |
| `LOWCODER_APP_SNAPSHOT_RETENTIONTIME` | Application snapshots retention time in days | `30` |

Also you should set the API-KEY secret, whcih should be a string of at least 32 random characters. (from Lowcoder v2.3.x on)
On linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
On linux/mac, generate one eg. with: `head /dev/urandom | head -c 30 | shasum -a 256`

| Environment variable | Description | Default-Value |
|-------------------------------------| ----------------------------------------------------------------------- | ----------------------------------------------------- |
Expand All @@ -76,7 +83,7 @@ To enable secure Password Reset flow for the users, you need to configure your o
| `LOWCODER_ADMIN_SMTP_SSL_ENABLED` | Enable SSL encryption | `false` |
| `LOWCODER_ADMIN_SMTP_STARTTLS_ENABLED` | Enable STARTTLS encryption | `true` |
| `LOWCODER_ADMIN_SMTP_STARTTLS_REQUIRED` | Require STARTTLS encryption | `true` |
| `LOWCODER_LOST_PASSWORD_EMAIL_SENDER` | "from" Email address of the password Reset Email Sender | `[email protected]` |
| `LOWCODER_EMAIL_NOTIFICATIONS_SENDER` | "from" Email address of the password Reset Email Sender | `info@localhost` |


## Building api-service image
Expand Down Expand Up @@ -119,6 +126,12 @@ Image can be configured by setting environment variables.
| `LOWCODER_MARKETPLACE_PRIVATE_MODE` | Control if not to show Apps on the local Marketplace to anonymous users | `true` |
| `LOWCODER_SUPERUSER_USERNAME` | Username of the Super-User of an Lowcoder Installation | `admin@localhost` |
| `LOWCODER_SUPERUSER_PASSWORD` | Password of the Super-User, if not present or empty, it will be generated | `generated and printed into log file |
| `LOWCODER_PLUGINS_DIR` | Directory holding lowcoder plugins | `/lowcoder-stacks/plugins` |
| `LOWCODER_COOKIE_NAME` | Name of the lowcoder application cookie | `LOWCODER_CE_SELFHOST_TOKEN` |
| `LOWCODER_COOKIE_MAX_AGE` | Lowcoder application cookie max age in hours | `24` |
| `LOWCODER_APP_SNAPSHOT_RETENTIONTIME` | Application snapshots retention time in days | `30` |
| `LOWCODER_NODE_SERVICE_SECRET` | Secret used for encrypting communication between API service and Node service - CHANGE IT! | |
| `LOWCODER_NODE_SERVICE_SALT` | Salt used for encrypting communication between API service and Node service - CHANGE IT! | |

Also you should set the API-KEY secret, whcih should be a string of at least 32 random characters. (from Lowcoder v2.3.x on)
On linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
Expand All @@ -140,7 +153,7 @@ To enable secure Password Reset flow for the users, you need to configure your o
| `LOWCODER_ADMIN_SMTP_SSL_ENABLED` | Enable SSL encryption | `false` |
| `LOWCODER_ADMIN_SMTP_STARTTLS_ENABLED` | Enable STARTTLS encryption | `true` |
| `LOWCODER_ADMIN_SMTP_STARTTLS_REQUIRED` | Require STARTTLS encryption | `true` |
| `LOWCODER_LOST_PASSWORD_EMAIL_SENDER` | "from" Email address of the password Reset Email Sender | `[email protected]` |
| `LOWCODER_EMAIL_NOTIFICATIONS_SENDER` | "from" Email address of the password Reset Email Sender | `info@localhost` |

## Building node-service image

Expand All @@ -163,6 +176,8 @@ Image can be configured by setting environment variables.
| `LOWCODER_PUID` | ID of user running services. It will own all created logs and data. | `9001` |
| `LOWCODER_PGID` | ID of group of the user running services. | `9001` |
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
| `LOWCODER_NODE_SERVICE_SECRET` | Secret used for encrypting communication between API service and Node service - CHANGE IT! | |
| `LOWCODER_NODE_SERVICE_SALT` | Salt used for encrypting communication between API service and Node service - CHANGE IT! | |

## Building web frontend image

Expand Down
21 changes: 21 additions & 0 deletions deploy/docker/default-multi.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#####################################################################
## ##
## Lowcoder environment variables override for multi image ##
## installation. ##
## ##
## !!! PLEASE DO NOT CHANGE THIS FILE !!! ##
## ##
## To change the variables use file: override.env ##
## ##
## It will be loaded automatically and will override the defaults ##
## You don't have to copy the whole default.env, only the changed ##
## environment variables. ##
## ##
#####################################################################

# Update individual service URLs to match the multi setup
LOWCODER_MONGODB_URL="mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
LOWCODER_REDIS_URL="redis://redis:6379"
LOWCODER_NODE_SERVICE_URL="http://lowcoder-node-service:6060"
LOWCODER_API_SERVICE_URL="http://lowcoder-api-service:8080"

Loading
Loading