This commit is contained in:
ycc 2024-09-04 14:41:27 +02:00
parent ad96b50464
commit 235c8d5ccb
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ func main() {
// Load the right config file
/* The configuration loader will load the configuration from the following sources:
* - the environment variables with the prefix APPNAME_
* - the file /etc/oc/appname.json
* - the file ./appname.json
* - the environment variables with the prefix OCAPPNAME_ - ex: OCMYCOMPONENT_MONGOURL
* - the file /etc/oc/appname.json - ex: /etc/oc/mycomponent.json
* - the file ./appname.json - ex: ./mycomponent.json
* The configuration loader will merge the configuration from the different sources
* The configuration loader will give priority to the environment variables
* The configuration loader will give priority to the local file over the default file

View File

@ -179,7 +179,7 @@ func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string,
* Returns:
* - *onion.Onion : the configuration loader
* The configuration loader will load the configuration from the following sources:
* - the environment variables with the prefix APPNAME_
* - the environment variables with the prefix OCAPPNAME_
* - the file /etc/oc/appname.json
* - the file ./appname.json
* The configuration loader will merge the configuration from the different sources