Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Store relay settings overrides in PostgreSQL (SETTINGS_BACKEND=db)

Đang mở
#757 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Ferryx349 đang làm issue này rồi.

Từ ngày 5/9/2026.

  • #758 của @Ferryx349 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

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_overrides table (path TEXT PK, value JSONB, updated_at TIMESTAMPTZ).
  • Introduce SETTINGS_BACKEND=file|db (default: file for backwards compatibility).
  • When SETTINGS_BACKEND=db:
    • Bootstrap loads overrides from PostgreSQL on startup.
    • If the table is empty, import existing settings.yaml / legacy settings.json once.
    • 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.
Ngôn ngữ chính
TypeScript
Star
829
Fork
234
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cameri/nostream

Tất cả issue của cameri/nostream

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.