Skip to content

Commit

Permalink
Add env variable to set java arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor committed Oct 9, 2024
1 parent f7011cc commit ce05f60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion files/nf-test
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ else
FILE_PATH_JAR=${APP_HOME}/${APP_JAR}
fi

JAVA_ARGS="-Xmx10G"
if [[ "$NFT_JAVA_ARGS" ]]; then
JAVA_ARGS="$NFT_JAVA_ARGS"
fi

export JAVA_PROGRAM_ARGS=`echo "$@"`

if [ "${JAVA_PROGRAM_ARGS}" = "update" ]; then
echo "Updating application..."
cd "${FOLDER}"
update
else
"${JAVA_CMD}" -Xmx10G -jar "${FILE_PATH_JAR}" "$@"
exec ${JAVA_CMD} ${JAVA_ARGS} -jar "${FILE_PATH_JAR}" "$@"
fi

0 comments on commit ce05f60

Please sign in to comment.