Skip to content

Update docker-images.yml #1833

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 5 commits into from
Jul 2, 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
21 changes: 21 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,21 @@ jobs:
# Image names
ALLINONE_IMAGE_NAMES=lowcoderorg/lowcoder-ce:${IMAGE_TAG}
FRONTEND_IMAGE_NAMES=lowcoderorg/lowcoder-ce-frontend:${IMAGE_TAG}
FRONTEND_EE_IMAGE_NAMES=lowcoderorg/lowcoder-ee-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}"
FRONTEND_EE_IMAGE_NAMES="lowcoderorg/lowcoder-ee-frontend:latest,${FRONTEND_EE_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 "FRONTEND_EE_IMAGE_NAMES=${FRONTEND_EE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
echo "APISERVICE_IMAGE_NAMES=${APISERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
echo "NODESERVICE_IMAGE_NAMES=${NODESERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"

Expand Down Expand Up @@ -146,6 +149,24 @@ jobs:
push: true
tags: ${{ env.FRONTEND_IMAGE_NAMES }}

- name: Build and push the enterprise edition frontend image
if: ${{ env.BUILD_FRONTEND == 'true' }}
uses: docker/build-push-action@v6
env:
NODE_ENV: production
with:
file: ./deploy/docker/Dockerfile
target: lowcoder-ee-frontend
build-args: |
REACT_APP_ENV=production
REACT_APP_EDITION=enterprise
REACT_APP_COMMIT_ID="dev #${{ env.SHORT_SHA }}"
platforms: |
linux/amd64
linux/arm64
push: true
tags: ${{ env.FRONTEND_EE_IMAGE_NAMES }}

- name: Build and push the node service image
if: ${{ env.BUILD_NODESERVICE == 'true' }}
uses: docker/build-push-action@v6
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
"translate": "node --loader ts-node/esm ./scripts/translate.js",
"build": "yarn node ./scripts/build.js",
"build:ee": "REACT_APP_EDITION=enterprise yarn node ./scripts/build.js",
"test": "jest && yarn workspace lowcoder-comps test",
"prepare": "yarn workspace lowcoder prepare",
"build:core": "yarn workspace lowcoder-core build",
Expand Down
78 changes: 78 additions & 0 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,84 @@ EXPOSE 3443

#############################################################################

##
## Build lowcoder client (Enterprise) application
##
FROM node:20.2-slim AS build-client-ee

# curl is required for yarn build to succeed, because it calls it while building client
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates

# Build client
COPY ./client /lowcoder-client-ee
WORKDIR /lowcoder-client-ee
RUN yarn --immutable

ARG REACT_APP_COMMIT_ID=test
ARG REACT_APP_ENV=production
ARG REACT_APP_EDITION=enterprise
ARG REACT_APP_DISABLE_JS_SANDBOX=true
RUN yarn build:ee

# Build lowcoder-comps
WORKDIR /lowcoder-client-ee/packages/lowcoder-comps
RUN yarn install
RUN yarn build
RUN tar -zxf lowcoder-comps-*.tgz && mv package lowcoder-comps

# Build lowcoder-sdk
WORKDIR /lowcoder-client-ee/packages/lowcoder-sdk
RUN yarn install
RUN yarn build

WORKDIR /lowcoder-client-ee/packages/lowcoder-sdk-webpack-bundle
RUN yarn install
RUN yarn build

##
## Intermediary Lowcoder client (Enterprise) image
##
## To create a separate image out of it, build it with:
## DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcoder-ee-frontend --target lowcoder-ee-frontend .
##
FROM nginx:1.27.1 AS lowcoder-ee-frontend
LABEL maintainer="lowcoder"

# Change default nginx user into lowcoder user and remove default nginx config
RUN usermod --login lowcoder --uid 9001 nginx \
&& groupmod --new-name lowcoder --gid 9001 nginx \
&& rm -f /etc/nginx/nginx.conf \
&& mkdir -p /lowcoder/assets

# Copy lowcoder client
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder/build/ /lowcoder/client
# Copy lowcoder components
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-comps/lowcoder-comps /lowcoder/client-comps
# Copy lowcoder SDK
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-sdk /lowcoder/client-sdk
# Copy lowcoder SDK webpack bundle
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-sdk-webpack-bundle/dist /lowcoder/client-embed


# Copy additional nginx init scripts
COPY deploy/docker/frontend/00-change-nginx-user.sh /docker-entrypoint.d/00-change-nginx-user.sh
COPY deploy/docker/frontend/01-update-nginx-conf.sh /docker-entrypoint.d/01-update-nginx-conf.sh

RUN chmod +x /docker-entrypoint.d/00-change-nginx-user.sh && \
chmod +x /docker-entrypoint.d/01-update-nginx-conf.sh

COPY deploy/docker/frontend/server.conf /etc/nginx/server.conf
COPY deploy/docker/frontend/nginx-http.conf /etc/nginx/nginx-http.conf
COPY deploy/docker/frontend/nginx-https.conf /etc/nginx/nginx-https.conf
COPY deploy/docker/frontend/ssl-certificate.conf /etc/nginx/ssl-certificate.conf
COPY deploy/docker/frontend/ssl-params.conf /etc/nginx/ssl-params.conf


EXPOSE 3000
EXPOSE 3444

#############################################################################

##
## Build Lowcoder all-in-one image
##
Expand Down
Loading