Store relay settings overrides in PostgreSQL (SETTINGS_BACKEND=db)
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Problem
Operator settings overrides currently live in settings.yaml under NOSTR_CONFIG_DIR with legacy settings.json fallback. That creates operational friction:
- When nostream releases add new default settings keys, operators editing YAML may not know new values exist or need to be added.
- Deploy/bootstrap flows copy config files that can drift from what the application expects after upgrades.
- Operators end up maintaining files that are easy to overwrite or fall out of sync with releases.
We need durable storage for operator overrides that survives upgrades without requiring manual YAML edits for every new setting.
Proposal
Store only operator overrides in PostgreSQL — not the full settings blob. Shipped defaults remain in resources/default-settings.yaml and are merged at runtime.
- Add a
settings_overridestable (pathTEXT PK,valueJSONB,updated_atTIMESTAMPTZ). - Introduce
SETTINGS_BACKEND=file|db(default:filefor backwards compatibility). - When
SETTINGS_BACKEND=db:- Bootstrap loads overrides from PostgreSQL on startup.
- If the table is empty, import existing
settings.yaml/ legacysettings.jsononce. - Admin settings PATCH and restore persist overrides to the DB.
- Runtime settings = shipped defaults merged with DB overrides.
Out of scope (follow-ups)
- DB-mode backup snapshots on each PATCH file mode still creates timestamped YAML backups.
- Hot-reload of DB overrides across all cluster workers after admin changes.
- Refactoring compose, bootstrap copied files so operators never edit release-owned files.
- Full settings schema migration, versioning in the DB.
- 主要语言
- TypeScript
- 星标
- 829
- 派生
- 234
- 平均合并
- 4 天 5 小时
- 30 天内合并 PR
- 22
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cameri/nostream 的其他 Issue
-
validateSettings() doesn't validate rateLimits[].period — zero period silently degrades to a 1ms backoff hint可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
feat(nip77): negentropy reconciliation core for the PostgreSQL backend可能已有人在做 @Priyanshubhartistm 于 2 天前认领。 未关闭enhancement
cameri/nostream#801 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(admin): bounded NIP-66 probe history and Network Health timeline可能已有人在做 @Ferryx349 于 3 天前认领。 未关闭Admin Console enhancement
cameri/nostream#800 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(nip85): Web-of-Trust spam mitigation engine可能重新可做 @Ferryx349 于 66 天前认领,目前没有进行中的 PR。 未关闭enhancement
cameri/nostream#720 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagree未关闭
难度 2/5 1-3 小时 新手友好度 68/100
sidorares/react-x11-components#764 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
backnotprop/plannotator#1840 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
JoviDeCroock/pracht#432 ·
维护者通常 1 天内回复
-
approved check:passed streams:add
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
Hardware attribute name "app Connection Support" has inconsistent casing可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
walletbeat/walletbeat#1628 ·
维护者通常 1 天内回复