Add Environment Variables Support for Addons
Problem
Docspell addons need a secure and standardized way to handle environment variables and secrets. Currently, there's no built-in way to pass environment variables to addons.
Proposed Solution
docspell.joex.addons {
configs = [
{
name = "my-postgres-addon"
enabled = true
envs = [
{
name = "POSTGRES_HOST"
value = "localhost"
},
{
name = "POSTGRES_PASSWORD"
valueFrom = { # future feature
env = "DS_POSTGRES_PASSWORD"
}
}
]
}
]
}
Environment Variable Mapping
DOCSPELL_JOEX_ADDONS_CONFIGS_0_NAME="my-postgres-addon"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_0_NAME="POSTGRES_HOST"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_0_VALUE="localhost"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_1_NAME="POSTGRES_PASSWORD"
Key Features
- Simple array-based configuration
- Support for direct values and environment variable references
- Extensible
valueFrom field for future secret providers
- Consistent with Docspell's configuration style
Future Extensions
The valueFrom field can be extended to support additional providers like:
- File-based secrets
- HashiCorp Vault
- Kubernetes secrets
- Cloud provider secret managers
Add Environment Variables Support for Addons
Problem
Docspell addons need a secure and standardized way to handle environment variables and secrets. Currently, there's no built-in way to pass environment variables to addons.
Proposed Solution
Environment Variable Mapping
Key Features
valueFromfield for future secret providersFuture Extensions
The
valueFromfield can be extended to support additional providers like: