diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/config.md | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/config.md b/docs/config.md index 9836a063..226d523b 100644 --- a/docs/config.md +++ b/docs/config.md @@ -13,7 +13,7 @@ The application supports several different configuration sources to make it easy The configuration options used by the application derive from the values specified by each of the sources, with sources higher in the hierarchy overwriting or expanding the configuration set earlier. The hierarchy is: ``` -Default Values < Environment Variables < YAML Configuration File < Command Line Arguments +Default Values < Environment Variables < YAML Configuration File < Command Line Arguments < Run-Time Overlay ``` Some options can be specified as lists. In these cases, when combining configurations from multiple sources, care should be taken. .NET framework not only appends but also overwrites values. If a list of `one;two;three` is defined in an environment variable for an option, and the YAML configuration specifies a list of `foo` and `bar`, the resulting configuration will be a list containing `foo, bar, three`. @@ -58,6 +58,26 @@ Some options are backed by arrays or lists and allow multiple options to be set --some-option 1 --some-option 2 --some-option 3 ``` +## Run-Time Overlay + +A small subset of options can be set at run-time via an API call. These options take precedence over all other sources and the values persist through configuration changes; they are 'sticky' but also volatile, meaning they are lost when the application is restarted. + +Details about the API endpoint (including the full set of available options) can be found in the OpenAPI specification that can be generated by enabling the 'swagger' feature. + +The following is a complete example (currently only `listenPort` and `listenIpAddress` are supported): + +```bash +curl --location --request PATCH 'http://localhost:5030/api/v0/options' \ +--header 'X-API-Key: <an API key with administrator role>' \ +--header 'Content-Type: application/json' \ +--data '{ + "soulseek": { + "listenPort": 52342, + "listenIpAddress": "0.0.0.0" + } +}' +``` + # Remote Configuration The application contains APIs for retrieving and updating the YAML configuration file. By default, this option is disabled. Applications run within untrusted networks, especially those where the application is internet-facing, should consider the risks of enabling this option. |
