line / line/centraldogma

Resolve configuration values using enviroment values

Open
#600 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

new feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.