Support a config file alongside env vars in containers #10

Merged
benvin merged 1 commits from benvin/config-file-and-env into main 2026-09-05 13:42:17 +10:00
Member

Why

A container could only be configured by PDBMUX_* env vars; a mounted config file was not a supported option.

How

  • --config <path> and PDBMUX_CONFIG select the config file (flag > env > default search path).
  • Default search order is $XDG_CONFIG_HOME/$HOME/.config then /etc/pdbmux/config.yaml, so a mounted configmap is picked up with no env var.
  • An explicitly named file that does not exist is an error; a missing file on the default search path is not.
  • config show names the file it loaded, or the paths it searched; README documents the precedence defaults < file < env < flags.
## Why A container could only be configured by `PDBMUX_*` env vars; a mounted config file was not a supported option. ## How - `--config <path>` and `PDBMUX_CONFIG` select the config file (flag > env > default search path). - Default search order is `$XDG_CONFIG_HOME`/`$HOME/.config` then `/etc/pdbmux/config.yaml`, so a mounted configmap is picked up with no env var. - An explicitly named file that does not exist is an error; a missing file on the default search path is not. - `config show` names the file it loaded, or the paths it searched; README documents the precedence `defaults < file < env < flags`.
unkin-agent added 1 commit 2026-09-05 12:29:25 +10:00
Support a config file alongside env vars in containers
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
03174f5ea0
- --config / PDBMUX_CONFIG select the file; /etc/pdbmux/config.yaml joins the default search order
benvin merged commit ffc2499f98 into main 2026-09-05 13:42:17 +10:00
benvin deleted branch benvin/config-file-and-env 2026-09-05 13:42:18 +10:00
Sign in to join this conversation.