Skip to content

Commit

Permalink
changes to switch to use Node 20, and help dwhite license issue (#86)
Browse files Browse the repository at this point in the history
* changes to switch to use Node 20, and add lines to help dwhite work around license issue.

* Changed/Added code to handle using the content of a license file or the license file itself
  • Loading branch information
dwhite-nuodb authored Dec 12, 2024
1 parent 0d437ae commit 2d5645e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"-Wall",
"-Werror",
"-Wextra",
"-std=c++14"
"-std=c++17"
],
"variables": {
"nuodb_client_package": "<!(echo ${NUODB_CLIENT_PACKAGE:-${NUODB_HOME:-\"/opt/nuodb\"}})"
Expand Down
18 changes: 16 additions & 2 deletions build-support/scripts/up
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

: ${IMG_NAME:="nuodb/nuodb:latest"}

if [ -z "${NUODB_LIMITED_LICENSE_CONTENT}" ] && [ -z "${NUODB_LIMITED_LICENSE}" ]; then
echo "Need a license setting"
exit -1
fi

COMMAND="docker exec ad1 nuocmd check database --db-name test --check-running"
if $COMMAND 2>/dev/null; then
echo "Environment already created."
Expand Down Expand Up @@ -29,8 +34,17 @@ docker exec ad1 nuocmd check servers --check-leader --check-connected --timeout
echo "Connected!"

# Apply limited license
echo -n "Applying license.. "
docker exec -e "NUODB_LIMITED_LICENSE_CONTENT=$NUODB_LIMITED_LICENSE_CONTENT" ad1 /bin/bash -c 'echo "$NUODB_LIMITED_LICENSE_CONTENT" | base64 -d > ~/nuodb.lic && nuocmd set license --license-file ~/nuodb.lic && rm ~/nuodb.lic'
echo "Applying license.. "
if [ -n "${NUODB_LIMITED_LICENSE_CONTENT}" ]; then
echo "using LICENSE CONTENT"
docker exec -e "NUODB_LIMITED_LICENSE_CONTENT=${NUODB_LIMITED_LICENSE_CONTENT}" ad1 /bin/bash -c 'echo "${NUODB_LIMITED_LICENSE_CONTENT}" | base64 -d > ~/nuodb.lic && /opt/nuodb/bin/nuocmd set license --license-file ~/nuodb.lic && rm ~/nuodb.lic'
elif [ -n "${NUODB_LIMITED_LICENSE}" ]; then
echo "using LICENSE"
docker cp ${NUODB_LIMITED_LICENSE} ad1:/tmp/nuodb.lic
docker exec ad1 /opt/nuodb/bin/nuocmd set license --license-file /tmp/nuodb.lic
else
echo "No License applied"
fi
echo "Done!"
echo
#changed to properly create and mount volumes
Expand Down
2 changes: 1 addition & 1 deletion dockers/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN npm run build
# -------------------------------------
# release image

FROM node:18-slim AS release
FROM node:20-slim AS release

COPY --from=build /opt/nuodb/lib64 /opt/nuodb/lib64
COPY --from=build /src /src

0 comments on commit 2d5645e

Please sign in to comment.