Skip to content
New issue

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

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

Already on GitHub? # to your account

Make system settings configurable via env variables #8537

Open
pazepaze opened this issue Dec 6, 2024 · 0 comments
Open

Make system settings configurable via env variables #8537

pazepaze opened this issue Dec 6, 2024 · 0 comments

Comments

@pazepaze
Copy link

pazepaze commented Dec 6, 2024

Settings like SYSTEM_SERVER_HOST or SYSTEM_USERS_IDENTICON should be configurable via env variables.

I made a helm chart to deploy geonetwork, but saw that some settings needed to be configured after the geonetwork was deployed. E.g. we would like to configure SYSTEM_SERVER_HOST or SYSTEM_USERS_IDENTICON. Configuring those via env variables would be best since this is the most convenient way for configuration when running in a container/kubernetes.

Describe the solution you'd like
At least those settings should be made configurable via env variable. Maybe it makes sense/is easier to just expose all settings in org.fao.geonet.kernel.setting.Settings via env variables.

Maybe something like this could be added to org.fao.geonet.kernel.setting.SettingManager#getValue(String, boolean)

// Check if the value is available as an environment variable
String envValue = System.getenv(key.replace("/", "_").toUpperCase());
if (envValue != null) {
    return envValue;
}

Additional context
I used GeoNetwork 4.4.6.

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

No branches or pull requests

1 participant