chore: add required java parameters + fix JAVA_OPTIONS #741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First part
In #731, @jusabatier tried to add the support for JAVA_OPTIONS. JAVA_OPTIONS is a variable for adding more parameters to JAVA_OPTS at runtime.
In this PR, this fixes this ability which didn't work because in #731, JAVA_OPTIONS was only evaluated at Docker build. There is now a script that appends JAVA_OPTIONS to JAVA_OPTS at runtime.
And also avoid confusion, because we previously used JAVA_OPTS when JAVA_OPTIONS wasn't supported, and I saw some usage in some docker compose. That was used without thinking that if you define JAVA_OPTS at runtime, then you lose all the parameters set for JAVA_OPTS in the Dockerfile. (-Dgeorchestra.datadir=/etc/georchestra -Xms512m -Xmx512m -XX:MaxPermSize=128m)
Essentially, you could very well run into a broken mapstore-georchestra install without understanding what happened exactly.
Second part
Add these standard java parameters that are used in all of our mapstore install and are required for mapstore-geOrchestra to function well :
This will avoid having to pass these parameters in docker compose or helm chart, guaranteeing that these parameters will always be there and work.
This is similar to what I suggested in georchestra/georchestra-gateway#147