diff --git a/CHANGELOG.md b/CHANGELOG.md index e73bf69f149d35a685fc77ff5c7839b86d13434e..38dba755c04fef7fb977431478eecf0aadaf4c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* Environment variables match `LINKAHEAD_CONFIG_*` now (instead of `CAOSDB_CONFIG_*`). + ### Deprecated ### Removed diff --git a/README_CONFIGURATION.md b/README_CONFIGURATION.md index 27045eea4523c5009e246fe506ec6319965d8e9f..06b36ebd7dc6a5d9d6faba0a13328e3190659f2e 100644 --- a/README_CONFIGURATION.md +++ b/README_CONFIGURATION.md @@ -9,7 +9,7 @@ The default configuration can be overriden by 1. the file ./conf/ext/server.conf 2. any file in ./conf/ext/server.conf.d/ in (approximately?) alphabetical order -3. environment variables with the prefix `CAOSDB_CONFIG_` +3. environment variables with the prefix `LINKAHEAD_CONFIG_` in this order. diff --git a/src/doc/administration/configuration.rst b/src/doc/administration/configuration.rst index c91ac16b1068b9261638aa697f3d11fd42a0d5cc..7dd0b49c95f9a241615bf4843a2c1aa85e3a8e16 100644 --- a/src/doc/administration/configuration.rst +++ b/src/doc/administration/configuration.rst @@ -16,7 +16,7 @@ with a hash (`#`). Key-value lines must have the format `KEY_NAME=VALUE` or The server default configuration is located at `./conf/core/server.conf`. Upstream defaults are stored here. The possible configuration options are documented inside the -`default file <https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/server.conf>`__. +`default file <https://gitlab.com/linkahead/linkahead-server/-/blob/dev/conf/core/server.conf>`__. User specific configuration should be in `./conf/ext/` and override settings in `./conf/core/`. @@ -27,7 +27,7 @@ The default configuration can be overriden by 2. any file in ./conf/ext/server.conf.d/ in (approximately?) alphabetical order - 3. environment variables with the prefix `CAOSDB_CONFIG_` + 3. environment variables with the prefix `LINKAHEAD_CONFIG_` in this order. diff --git a/src/main/java/org/caosdb/server/ServerProperties.java b/src/main/java/org/caosdb/server/ServerProperties.java index 93a0c7473be1c31565e4b159ba55e01d557687e7..8789a5635e9d9896af4419cb7ce9773eddd268e5 100644 --- a/src/main/java/org/caosdb/server/ServerProperties.java +++ b/src/main/java/org/caosdb/server/ServerProperties.java @@ -186,8 +186,17 @@ public class ServerProperties extends Properties implements Observable { // load env vars for (final java.util.Map.Entry<String, String> envvar : System.getenv().entrySet()) { + if (envvar.getKey().startsWith("LINKAHEAD_CONFIG_") && envvar.getKey().length() > 17) { + serverProperties.setProperty(envvar.getKey().substring(17), envvar.getValue()); + } if (envvar.getKey().startsWith("CAOSDB_CONFIG_") && envvar.getKey().length() > 14) { - serverProperties.setProperty(envvar.getKey().substring(14), envvar.getValue()); + logger.warn( + "Environment variables start with LINKAHEAD_CONFIG_ now (instead of the old " + + "CAOSDB_CONFIG_). Consider renaming: " + + envvar.getKey() + + " ( = " + + envvar.getValue() + + " )"); } }