Resolve configuration values using enviroment values
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 668
- Forks
- 135
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 7
Description
Central Dogma only statically resolves the configuration file - `dogma.json`.
It could be convenient to override the configuration with environment variables, especially for Docker and cloud infrastructure.
The following syntax is inspired by [logback's configuration via environment variables](https://www.cloudesire.com/configure-logback-log-level-via-environment-variables/)
```json
{
"dataDir": "${DATA_DIR:-./data}",
"numRepositoryWorkers": "${NUM_REPOSITORY_WORKERS:-16}",
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating how dogma.json is parsed and how its configuration values are statically resolved. Verify the proposed ${NAME:-default} syntax, including environment overrides and fallback values, and add coverage for the shown dataDir and numRepositoryWorkers cases; done means configuration can be supplied through environment variables without breaking defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100