Persist chat history to Postgres via durable JetStream consumer

DATABASE_URL required at startup; schema self-initializes.
Compose gains a postgres service for standalone dev.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 22:14:26 +02:00
parent 6b97ec3b0f
commit ec3771f2e7
10 changed files with 696 additions and 21 deletions
+3
View File
@@ -3,6 +3,9 @@
# NATS server the chat server publishes/subscribes on.
NATS_URL=nats://127.0.0.1:4222
# Postgres archive for message history (written by the JetStream consumer).
DATABASE_URL=postgres://cnats:cnats@127.0.0.1:5432/cnats
# Base URL of your Kanidm instance (no trailing slash).
KANIDM_URL=https://idm.example.com