You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thanks for this project! I wasn't sure how to make a PR, but I solved this for myself and thought I'd quickly share back the code here.
Allowing override of any config file variable with an associated environment variable makes running in a dynamically provisioned container much easier.
This minor adaption will enable override of, e.g. gitea.personal_access_token by setting ${KOODER_GITEA_PERSONAL_ACCESS_TOKEN}
In Configuration.java:
// allow override of any config vars with environment varsprivateStringgetEnvironmentVarName(Stringkey) {
return"KOODER_" + key.replace('.', '_').toUpperCase();
}
publicStringgetProperty(Stringkey) {
// allow override with environment varsStringvalue = System.getenv(getEnvironmentVarName(key));
if(value != null) {
returnvalue;
}
returnthis.props.getProperty(key);
}
[... dothesameineachgetProperty(...) ...]
The text was updated successfully, but these errors were encountered:
Hello, thanks for this project! I wasn't sure how to make a PR, but I solved this for myself and thought I'd quickly share back the code here.
Allowing override of any config file variable with an associated environment variable makes running in a dynamically provisioned container much easier.
This minor adaption will enable override of, e.g. gitea.personal_access_token by setting ${KOODER_GITEA_PERSONAL_ACCESS_TOKEN}
In Configuration.java:
The text was updated successfully, but these errors were encountered: