Skip to content

Commit f81eb8a

Browse files
committed
fix: add all missing default variables to all-in-one entrypoint script
1 parent a6b3bda commit f81eb8a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

deploy/docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ COPY --chown=lowcoder:lowcoder --from=lowcoder-ce-node-service /lowcoder/node-se
263263
COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/etc /lowcoder/etc
264264

265265
# Add startup script
266-
COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/entrypoint.sh /lowcoder/entrypoint.sh
266+
COPY --chown=lowcoder:lowcoder --chmod=0755 deploy/docker/all-in-one/entrypoint.sh /lowcoder/entrypoint.sh
267+
268+
# Copy default environment properties
269+
COPY --chown=lowcoder:lowcoder deploy/docker/default.env /lowcoder/etc/default.env
267270

268271
# Fixes for OpenShift compatibility (after all files are copied)
269272
RUN echo \

deploy/docker/all-in-one/entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ set -e
55
export USER_ID=${LOWCODER_PUID:=9001}
66
export GROUP_ID=${LOWCODER_PGID:=9001}
77

8+
# Set default variable values
9+
echo "Overriding default environment variables:"
10+
for line in `grep '^[ \t]*LOWCODER_.*$' /lowcoder/etc/default.env`; do
11+
VARNAME=`echo ${line} | sed -e 's/^\([A-Z0-9_]\+\)\([ \t]*=[ \t]*\)\(.*\)$/\1/'`
12+
if [ -z "$(eval echo \"\$$VARNAME\")" ]; then
13+
export $(eval echo "${line}")
14+
else
15+
echo " ${line}"
16+
fi;
17+
done;
18+
echo "Done."
19+
820
# Update ID of lowcoder user if required
921
if [ ! "$(id --user lowcoder)" -eq ${USER_ID} ]; then
1022
usermod --uid ${USER_ID} lowcoder

0 commit comments

Comments
 (0)