feat(services/config): Add ability to set Trilium configuration variables via ENV variables #1036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
this PR is a continuation of @perfectra1n's PR #1031
It allows users to set the currently defined values via env variables (new!), config.ini (as before) or use fallback values (semi-new!).
The order is:
ENV > config.ini > fallback values
as @perfectra1n mentioned in the matrix Development channel, there still are a couple of env vars, scattered around, that are currently not part of this config file.
Let's split that out into a separate task though – this PR only concentrates on the ones that can be mapped to values in the config.ini file
Also some additional clean up will be necessary, e.g. in port.ts, but will split that out to separate task as well.
big thanks to @perfectra1n for letting me take over here!
edit:
once this PR is merged, TriliumNext/Docs#125 can be adjusted slightly and then merged as well
this also closes #438