Config: Support YAML filenames with alternative extensions #5304

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-11-02 11:33:40 +01:00
parent 50e77e3a9d
commit d6f0e808eb
15 changed files with 329 additions and 159 deletions

View File

@@ -1,6 +1,6 @@
PhotoPrism — Backend CODEMAP
**Last Updated:** October 29, 2025
**Last Updated:** November 2, 2025
Purpose
- Give agents and contributors a fast, reliable map of where things live and how they fit together, so you can add features, fix bugs, and write tests without spelunking.
@@ -142,6 +142,7 @@ Common HowTos
- Expose a getter (e.g., in `config_server.go` or topic file)
- Append to `rows` in `*config.Report()` after the same option as in `options.go`
- If value must persist, write back to `options.yml` and reload into memory
- When you need the path to defaults/options/settings files, call `pkg/fs.ConfigFilePath` so `.yml` and `.yaml` stay interchangeable.
- Tests: cover CLI/env/file precedence (see `internal/config/test.go` helpers)
- Touch the DB schema