Open
Conversation
- Add AddonConfig, AddonEnvVar, AddonEnvVarFrom case classes - Extend AddonEnvConfig with configs: List[AddonConfig] - Add configs = [] to docspell.joex.addons in reference.conf - Add HOCON parsing tests for AddonConfig and AddonEnvConfig Co-authored-by: Cursor <cursoragent@cursor.com>
- Add AddonEnvVar.resolve (value, valueFrom.env, optional) - Add AddonConfig.toEnv for enabled configs - Add tests for resolve and toEnv Co-authored-by: Cursor <cursoragent@cursor.com>
- Add addonEnvResolver: String => Env to AddonExecutor - Merge config env in runAddon before runner.run - Build resolver from cfg.configs in AddonOps.getExecutor - Add inject env vars test in AddonExecutorTest Co-authored-by: Cursor <cursoragent@cursor.com>
Use tuple discard for task dependencies to avoid 'pure expression does nothing in statement position' compiler warning. Co-authored-by: Cursor <cursoragent@cursor.com>
Verify DOCSPELL_JOEX_ADDONS_CONFIGS_* override works in EnvConfigTest Co-authored-by: Cursor <cursoragent@cursor.com>
- Expand reference.conf comment with example and value/value-from - Add Environment variables section to addons control docs Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add support for addon-specific environment variables
Closes #2896
Summary
Add server-level configuration to inject custom environment variables into addons. Configs are keyed by addon name and support direct values or reading from the process environment.
Configuration
value: literal stringvalue-from: read from process env.env= source variable name;optional(default: true) — when source unset: true = skip, false = inject empty stringEnvironment variable override
Running example
Use docspell-addon-example — it logs all
DOCSPELL_TEST_*env vars to stderr.Used config: