This commit is contained in:
2025-11-17 18:45:35 +01:00
parent 0f58e3bdff
commit 14d6f9aa73
7607 changed files with 1969407 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
export USER_ID=${LOWCODER_PUID:=9001}
export GROUP_ID=${LOWCODER_PGID:=9001}
export API_HOST="${LOWCODER_API_SERVICE_URL:=http://localhost:8080}"
# Run init script
echo "Initializing node-service..."
/lowcoder/node-service/init.sh
cd /lowcoder/node-service/app
echo
echo "Running Lowcoder node-service with:"
echo " API service host: ${API_HOST}"
if [ "$(id -u)" -eq 0 ]; then
# only use su if its possible, suppress for containers running non-root
echo " user id: ${USER_ID}"
echo " group id: ${GROUP_ID}"
GOSU="gosu ${USER_ID}:${GROUP_ID}"
fi
echo
exec $GOSU yarn start

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
NODE_SERVICE_ROOT=/lowcoder/node-service
# Update ID of lowcoder user if required
if [ ! `id --user lowcoder` -eq ${USER_ID} ]; then
usermod --uid ${USER_ID} lowcoder
echo "ID for lowcoder user changed to: ${USER_ID}"
DO_CHOWN="true"
fi;
# Update ID of lowcoder group if required
if [ ! `id --group lowcoder` -eq ${GROUP_ID} ]; then
groupmod --gid ${GROUP_ID} lowcoder
echo "ID for lowcoder group changed to: ${GROUP_ID}"
DO_CHOWN="true"
fi;
# Update node-server installation owner
if [ "${DO_CHOWN}" = "true" ]; then
echo "Changing node-service owner to ${USER_ID}:${GROUP_ID}"
chown -R ${USER_ID}:${GROUP_ID} ${NODE_SERVICE_ROOT}
fi;
echo "Lowcoder node-service setup finished."