PromucFlow_constructor/app/server/entrypoint.sh
Nidhi 3878b50050
fix: Added JVM arg to opens java.time module to project (#20326)
## Description

Since Spring 6/JDK 17 upgrade, our analytics code errors out unless we
expose the `java.time` module to our project. This has been fixed for
fat container scripts, but slim containers were not updated. This PR
makes the same changes to slim containers.

Fixes #20323
2023-02-02 17:19:53 +05:30

16 lines
658 B
Bash
Executable File

#!/bin/sh
# Add an `authSource` query param to MongoDB URI, if missing.
if [ -n "$APPSMITH_MONGODB_URI" ]; then
if ! echo "$APPSMITH_MONGODB_URI" | grep -Fq "authSource="; then
if echo "$APPSMITH_MONGODB_URI" | grep -Fq '?'; then
APPSMITH_MONGODB_URI="$APPSMITH_MONGODB_URI&authSource=admin"
else
APPSMITH_MONGODB_URI="$APPSMITH_MONGODB_URI?authSource=admin"
fi
fi
fi
# Ref -Dlog4j2.formatMsgNoLookups=true https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
exec java -Djava.security.egd="file:/dev/./urandom" "$@" -Dlog4j2.formatMsgNoLookups=true --add-opens java.base/java.time=ALL-UNNAMED -jar server.jar