🔧(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-23 12:06:05 +02:00
committed by Manuel Raynaud
parent 6be5f758ee
commit 935ba07e49
5 changed files with 31 additions and 12 deletions
+8 -3
View File
@@ -229,10 +229,11 @@ services:
image: postgres:16-alpine
env_file:
- env.d/development/yhub-postgres
- env.d/development/yhub-postgres.local
volumes:
- yhub-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U yhub"]
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 1s
timeout: 2s
retries: 60
@@ -251,9 +252,13 @@ services:
image: impress:yhub-development
environment:
HOME: /tmp # same reason as node-based services above (unmapped uid)
# its own file rather than the backend's: this server reads none of the
# django settings `common` carries, and everything it does read is in there
# its own files rather than the backend's: this server reads none of the
# django settings `common` carries. The database url is in the file its
# postgres is configured from, beside the credentials it spells out;
# everything else this server reads is in `yhub`
env_file:
- env.d/development/yhub-postgres
- env.d/development/yhub-postgres.local
- env.d/development/yhub
- env.d/development/yhub.local
volumes: