Skip to content

Commit 965559f

Browse files
authored
Merge pull request #1833 from lowcoder-org/FalkWolsky-patch-1
Update docker-images.yml
2 parents e30af23 + 511f79f commit 965559f

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

.github/workflows/docker-images.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,21 @@ jobs:
8080
# Image names
8181
ALLINONE_IMAGE_NAMES=lowcoderorg/lowcoder-ce:${IMAGE_TAG}
8282
FRONTEND_IMAGE_NAMES=lowcoderorg/lowcoder-ce-frontend:${IMAGE_TAG}
83+
FRONTEND_EE_IMAGE_NAMES=lowcoderorg/lowcoder-ee-frontend:${IMAGE_TAG}
8384
APISERVICE_IMAGE_NAMES=lowcoderorg/lowcoder-ce-api-service:${IMAGE_TAG}
8485
NODESERVICE_IMAGE_NAMES=lowcoderorg/lowcoder-ce-node-service:${IMAGE_TAG}
8586
8687
if [[ "${IS_LATEST}" == "true" ]]; then
8788
ALLINONE_IMAGE_NAMES="lowcoderorg/lowcoder-ce:latest,${ALLINONE_IMAGE_NAMES}"
8889
FRONTEND_IMAGE_NAMES="lowcoderorg/lowcoder-ce-frontend:latest,${FRONTEND_IMAGE_NAMES}"
90+
FRONTEND_EE_IMAGE_NAMES="lowcoderorg/lowcoder-ee-frontend:latest,${FRONTEND_EE_IMAGE_NAMES}"
8991
APISERVICE_IMAGE_NAMES="lowcoderorg/lowcoder-ce-api-service:latest,${APISERVICE_IMAGE_NAMES}"
9092
NODESERVICE_IMAGE_NAMES="lowcoderorg/lowcoder-ce-node-service:latest,${NODESERVICE_IMAGE_NAMES}"
9193
fi;
9294
9395
echo "ALLINONE_IMAGE_NAMES=${ALLINONE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
9496
echo "FRONTEND_IMAGE_NAMES=${FRONTEND_IMAGE_NAMES}" >> "${GITHUB_ENV}"
97+
echo "FRONTEND_EE_IMAGE_NAMES=${FRONTEND_EE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
9598
echo "APISERVICE_IMAGE_NAMES=${APISERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
9699
echo "NODESERVICE_IMAGE_NAMES=${NODESERVICE_IMAGE_NAMES}" >> "${GITHUB_ENV}"
97100
@@ -146,6 +149,24 @@ jobs:
146149
push: true
147150
tags: ${{ env.FRONTEND_IMAGE_NAMES }}
148151

152+
- name: Build and push the enterprise edition frontend image
153+
if: ${{ env.BUILD_FRONTEND == 'true' }}
154+
uses: docker/build-push-action@v6
155+
env:
156+
NODE_ENV: production
157+
with:
158+
file: ./deploy/docker/Dockerfile
159+
target: lowcoder-ee-frontend
160+
build-args: |
161+
REACT_APP_ENV=production
162+
REACT_APP_EDITION=enterprise
163+
REACT_APP_COMMIT_ID="dev #${{ env.SHORT_SHA }}"
164+
platforms: |
165+
linux/amd64
166+
linux/arm64
167+
push: true
168+
tags: ${{ env.FRONTEND_EE_IMAGE_NAMES }}
169+
149170
- name: Build and push the node service image
150171
if: ${{ env.BUILD_NODESERVICE == 'true' }}
151172
uses: docker/build-push-action@v6

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
1616
"translate": "node --loader ts-node/esm ./scripts/translate.js",
1717
"build": "yarn node ./scripts/build.js",
18+
"build:ee": "REACT_APP_EDITION=enterprise yarn node ./scripts/build.js",
1819
"test": "jest && yarn workspace lowcoder-comps test",
1920
"prepare": "yarn workspace lowcoder prepare",
2021
"build:core": "yarn workspace lowcoder-core build",

deploy/docker/Dockerfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,84 @@ EXPOSE 3443
185185

186186
#############################################################################
187187

188+
##
189+
## Build lowcoder client (Enterprise) application
190+
##
191+
FROM node:20.2-slim AS build-client-ee
192+
193+
# curl is required for yarn build to succeed, because it calls it while building client
194+
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
195+
196+
# Build client
197+
COPY ./client /lowcoder-client-ee
198+
WORKDIR /lowcoder-client-ee
199+
RUN yarn --immutable
200+
201+
ARG REACT_APP_COMMIT_ID=test
202+
ARG REACT_APP_ENV=production
203+
ARG REACT_APP_EDITION=enterprise
204+
ARG REACT_APP_DISABLE_JS_SANDBOX=true
205+
RUN yarn build:ee
206+
207+
# Build lowcoder-comps
208+
WORKDIR /lowcoder-client-ee/packages/lowcoder-comps
209+
RUN yarn install
210+
RUN yarn build
211+
RUN tar -zxf lowcoder-comps-*.tgz && mv package lowcoder-comps
212+
213+
# Build lowcoder-sdk
214+
WORKDIR /lowcoder-client-ee/packages/lowcoder-sdk
215+
RUN yarn install
216+
RUN yarn build
217+
218+
WORKDIR /lowcoder-client-ee/packages/lowcoder-sdk-webpack-bundle
219+
RUN yarn install
220+
RUN yarn build
221+
222+
##
223+
## Intermediary Lowcoder client (Enterprise) image
224+
##
225+
## To create a separate image out of it, build it with:
226+
## DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcoder-ee-frontend --target lowcoder-ee-frontend .
227+
##
228+
FROM nginx:1.27.1 AS lowcoder-ee-frontend
229+
LABEL maintainer="lowcoder"
230+
231+
# Change default nginx user into lowcoder user and remove default nginx config
232+
RUN usermod --login lowcoder --uid 9001 nginx \
233+
&& groupmod --new-name lowcoder --gid 9001 nginx \
234+
&& rm -f /etc/nginx/nginx.conf \
235+
&& mkdir -p /lowcoder/assets
236+
237+
# Copy lowcoder client
238+
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder/build/ /lowcoder/client
239+
# Copy lowcoder components
240+
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-comps/lowcoder-comps /lowcoder/client-comps
241+
# Copy lowcoder SDK
242+
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-sdk /lowcoder/client-sdk
243+
# Copy lowcoder SDK webpack bundle
244+
COPY --chown=lowcoder:lowcoder --from=build-client-ee /lowcoder-client-ee/packages/lowcoder-sdk-webpack-bundle/dist /lowcoder/client-embed
245+
246+
247+
# Copy additional nginx init scripts
248+
COPY deploy/docker/frontend/00-change-nginx-user.sh /docker-entrypoint.d/00-change-nginx-user.sh
249+
COPY deploy/docker/frontend/01-update-nginx-conf.sh /docker-entrypoint.d/01-update-nginx-conf.sh
250+
251+
RUN chmod +x /docker-entrypoint.d/00-change-nginx-user.sh && \
252+
chmod +x /docker-entrypoint.d/01-update-nginx-conf.sh
253+
254+
COPY deploy/docker/frontend/server.conf /etc/nginx/server.conf
255+
COPY deploy/docker/frontend/nginx-http.conf /etc/nginx/nginx-http.conf
256+
COPY deploy/docker/frontend/nginx-https.conf /etc/nginx/nginx-https.conf
257+
COPY deploy/docker/frontend/ssl-certificate.conf /etc/nginx/ssl-certificate.conf
258+
COPY deploy/docker/frontend/ssl-params.conf /etc/nginx/ssl-params.conf
259+
260+
261+
EXPOSE 3000
262+
EXPOSE 3444
263+
264+
#############################################################################
265+
188266
##
189267
## Build Lowcoder all-in-one image
190268
##

0 commit comments

Comments
 (0)