Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default georchestra datadir location #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edevosc2c
Copy link
Member

The purpose of this PR is to set the default geOrchestra datadir location. In order to avoid having to specify it in all our deployments.

/etc/georchestra is a standard directory used in Docker and even in Debian package for geOrchestra.

It is already included inside many of our Dockerfile: https://github.com/search?q=repo%3Ageorchestra%2Fgeorchestra%20%2Fetc%2Fgeorchestra&type=code and even sometimes in the application.yml itself: https://github.com/georchestra/georchestra/blob/5f9743f0a773eaf5f276ca459c80423e16cad364/datafeeder/src/main/resources/application.yml#L108

I'm proposing this PR because as of right now we can't customize the Dockerfile so we can't set a default geOrchestra datadir location through this file.

@pmauduit told me that you can still change the parameter even though it is compiled from the source code: https://docs.spring.io/spring-boot/reference/features/external-config.html. Using a method like JAVA_TOOL_OPTIONS: "-Dgeorchestra.datadir=/etc/georchestra". So nobody is stuck with this static directory.

@pmauduit
Copy link
Member

Using a method like JAVA_TOOL_OPTIONS: "-Dgeorchestra.datadir=/etc/georchestra". So nobody is stuck with this static directory.

from my understanding of the official spring boot documentation I pointed, indeed. I have not tested though.
Please also note that using an environment variable GEORCHESTRA_DATADIR should also override the default behaviour (if it takes precedence over the yaml file from the classpath). And maybe doing so is less intrusive than having to define / override the JAVA_TOOL_OPTION one.

Copy link
Member

@pmauduit pmauduit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really mind the change, but since we already do the same onto the default datafeeder configuration, then I am okay with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants