Skip to content
Snippets Groups Projects
Verified Commit bcf9cc9c authored by Florian Spreckelsen's avatar Florian Spreckelsen Committed by Daniel Hornung
Browse files

MAINT: Environment variables match LINKAHEAD_CONFIG_* now.

parent ebb1d766
Branches
Tags
No related merge requests found
Pipeline #61570 failed
...@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
* Environment variables match `LINKAHEAD_CONFIG_*` now (instead of `CAOSDB_CONFIG_*`).
### Deprecated ### Deprecated
### Removed ### Removed
......
...@@ -9,7 +9,7 @@ The default configuration can be overriden by ...@@ -9,7 +9,7 @@ The default configuration can be overriden by
1. the file ./conf/ext/server.conf 1. the file ./conf/ext/server.conf
2. any file in ./conf/ext/server.conf.d/ in (approximately?) alphabetical order 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. in this order.
......
...@@ -16,7 +16,7 @@ with a hash (`#`). Key-value lines must have the format `KEY_NAME=VALUE` or ...@@ -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`. The server default configuration is located at `./conf/core/server.conf`.
Upstream defaults are stored here. The possible configuration options are Upstream defaults are stored here. The possible configuration options are
documented inside the 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 User specific configuration should be in `./conf/ext/` and override settings
in `./conf/core/`. in `./conf/core/`.
...@@ -27,7 +27,7 @@ The default configuration can be overriden by ...@@ -27,7 +27,7 @@ The default configuration can be overriden by
2. any file in ./conf/ext/server.conf.d/ in (approximately?) alphabetical order 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. in this order.
......
...@@ -186,8 +186,17 @@ public class ServerProperties extends Properties implements Observable { ...@@ -186,8 +186,17 @@ public class ServerProperties extends Properties implements Observable {
// load env vars // load env vars
for (final java.util.Map.Entry<String, String> envvar : System.getenv().entrySet()) { 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) { 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()
+ " )");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment