Configuration Overview
DpeNanoServices is based on Microsoft .Net Core. Microsoft .Net Core offers the following built-in ways for specifying configuration:
appsettings.json file (lowest priority)
environment variables
command-line options (highest priority)
See also https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-7.0
Configuring an option in appsettings.json
Example: DpeLogging | UseFileLogger
{
...
"DpeLogging": {
"UseFileLogger": true,
}
...
}
Configuring an option with environment varriables
Example: DpeLogging | UseFileLogger
According to the hierarchical structure of appsettings.json options the environment variable name is derived by adding double underscores between hierarchies
set DpeLogging__UseFileLogger=true
Configuring an option from command line
Example: DpeLogging | UseFileLogger
According to the hierarchical structure of appsettings.json options the command-line option name is derived by adding a colon between hierarchies
dotnet DpeNanoServices DpeLogging:UseFileLogger=true