🔧(yhub) align the yhub db credentials with the backend's dev ones

The yhub database ran under its own yhub role. Every other database in
this stack uses the backend's dev credentials, dinum/pass, which is also
what CI already uses for this database; only the database name stays
apart, since it is a separate database on a separate server.

The url the collaboration server connects with moves into the same file,
beside the credentials it repeats, written once rather than twice — the
yhub service reads the file as well. A yhub-postgres.local override is
created like for the other env files, and the healthcheck asks about
POSTGRES_DB and POSTGRES_USER like the other two do instead of naming the
role.

POSTGRES_USER only takes effect on a fresh initdb, so an existing stack
needs its yhub-pgdata volume dropped and `make migrate-yhub` re-run; the
volume holds local document state only.

Signed-off-by: Kevin Jahns <kevin.jahns@protonmail.com>
This commit is contained in:
Kevin Jahns
2026-09-01 15:33:26 +02:00
committed by Anthony LC
parent 3a4fb9a8aa
commit 5b9f142bef
5 changed files with 31 additions and 12 deletions
+7 -5
View File
@@ -1,14 +1,16 @@
# Collaboration server (yhub)
#
# Everything the collaboration server reads, and nothing else: it shares the
# backend's stores and origins by value, not by loading the backend's own
# environment. Override any of it in yhub.local, which is not committed.
# Everything the collaboration server reads but its database url, and nothing
# else: it shares the backend's stores and origins by value, not by loading the
# backend's own environment. Override any of it in yhub.local, which is not
# committed.
# Stores. Its own valkey and its own postgres database — the backend's live
# next to them and are never touched from here.
# next to them and are never touched from here. The postgres url is not here
# but in `yhub-postgres`, the file that database is configured from, so that
# its credentials are written once; this service reads that file too.
PORT=3002
REDIS=redis://yhub-valkey:6379
POSTGRES=postgres://yhub:pass@yhub-postgres:5432/yhub
REDIS_PREFIX=yhub
# Backend. It answers who a user is and what they may do with a document, and
+10 -1
View File
@@ -1,4 +1,13 @@
# Postgresql db container configuration for the collaboration server (yhub).
# Its own database on its own server: the backend's lives next to it and is
# never touched from here. The credentials are the backend's dev ones, and the
# ones CI uses for this database too — only the database name differs.
POSTGRES_DB=yhub
POSTGRES_USER=yhub
POSTGRES_USER=dinum
POSTGRES_PASSWORD=pass
# What the collaboration server connects with: the credentials above spelled as
# a url, which is the only form it takes. Read by the `yhub` service as well,
# which is why it lives here rather than next to the rest of that server's
# settings — the password is written once.
POSTGRES=postgres://dinum:pass@yhub-postgres:5432/yhub