From b918a69195f5c1337a2b301e49511516e3cd581a Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Mon, 1 Jul 2024 10:26:28 +0200 Subject: [PATCH] feat: support setting java options via JAVA_OPTS environment variable --- containers/opcua-device-gateway/Dockerfile | 1 + containers/opcua-device-gateway/entrypoint.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/containers/opcua-device-gateway/Dockerfile b/containers/opcua-device-gateway/Dockerfile index 0632bd8..5f427d3 100644 --- a/containers/opcua-device-gateway/Dockerfile +++ b/containers/opcua-device-gateway/Dockerfile @@ -48,5 +48,6 @@ COPY entrypoint.sh . ENV OPCUA_GATEWAY_IDENTIFIER=OPCUAGateway ENV OPCUA_GATEWAY_NAME=OPCUAGateway ENV MQTT_BROKER=mqtt-broker:1883 +ENV JAVA_OPTS= CMD ["/app/entrypoint.sh"] diff --git a/containers/opcua-device-gateway/entrypoint.sh b/containers/opcua-device-gateway/entrypoint.sh index c1c4e45..4e4bfc4 100755 --- a/containers/opcua-device-gateway/entrypoint.sh +++ b/containers/opcua-device-gateway/entrypoint.sh @@ -34,4 +34,5 @@ echo "Settings" echo " OPCUA_GATEWAY_IDENTIFIER: $OPCUA_GATEWAY_IDENTIFIER" >&2 echo " OPCUA_GATEWAY_NAME: $OPCUA_GATEWAY_NAME" >&2 echo "Starting the opcua-device-gateway..." -exec /usr/bin/java -Dlogging.config=file:./logging.xml -Dspring.profiles.active=default,tenant -jar opcua-device-gateway.jar -Dspring.config.location=file:./application-tenant.yaml "$@" +# shellcheck disable=SC2086 +exec /usr/bin/java $JAVA_OPTS -Dlogging.config=file:./logging.xml -Dspring.profiles.active=default,tenant -jar opcua-device-gateway.jar -Dspring.config.location=file:./application-tenant.yaml "$@"