Skip to content

Commit

Permalink
feat: support setting java options via JAVA_OPTS environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Jul 1, 2024
1 parent a305298 commit b918a69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions containers/opcua-device-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 2 additions & 1 deletion containers/opcua-device-gateway/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"

0 comments on commit b918a69

Please sign in to comment.