Skip to content

feat(config): support TOML config file alongside env vars

BhEaN requested to merge 002-config-file-configuration into main

Summary

  • Add TOML config file support: loads /app/config.toml (container) or ./config.toml (local dev) when present
  • Env vars override file values; missing file silently ignored so env-only deployments keep working
  • Unknown keys and malformed TOML fail fast before polling begins
  • Dockerfile copies config.toml to /app/config.toml as the default container config

Test plan

  • make py/pytest passes (49 tests)
  • make run connects to meter and emits metric_read_succeeded events
  • Start with config file only (no env vars) — service starts normally
  • Start with env var overriding a file value — env var wins
  • Start with malformed TOML — fails before first poll with configuration_error event
  • Start with unknown TOML key — fails with key name in error message
Edited by BhEaN

Merge request reports

Loading