Files
lasuite-docs/env.d/development/yhub
T
Kevin JahnsandAnthony LC 3a4fb9a8aa ⬆️(collaboration) upgrade yhub to 0.9.0 and really delete superseded blobs
The S3 persistence plugin records the version id of the object it wrote
and names that version when it deletes it. On a versioned bucket - what
a deployment runs - a delete that names no version deletes nothing: it
writes a delete marker and keeps every version underneath. Each
compaction supersedes the blobs of the one before, so what was kept was
every version of every document ever written, a document someone asked
to erase included, still readable by anyone who can list versions. On
AWS this needs s3:DeleteObjectVersion, which a policy granting
s3:DeleteObject alone does not cover.

Blobs are written to the bucket for every branch of a document.

YHUB_S3_PERSISTENCE now governs only whether new blobs are written
there. The plugin itself is attached whenever the YHUB_S3_* settings
name a bucket, on or off, because reading is the half that must never
be taken away: a row pointing at an object is unreadable without the
plugin that wrote it, and yhub reports such a version as having no
content rather than as an error. Turning the toggle off stops the
writing and leaves the reading alone; it is the settings, not the
toggle, that a deployment whose bucket holds anything must keep. Half a
configuration is a startup error naming what is missing, as before.

The dev stack keeps the toggle off and creates its bucket versioned, so
flipping it on exercises what a deployment runs rather than a simpler
case. Its createbuckets job needed fixing to do so: the folded yaml
block joins its lines with a space, so the trailing backslashes reached
the shell as an escaped space glued to the next word and everything
past the first && silently did nothing - the media bucket never had
versioning enabled either.

Signed-off-by: Kevin Jahns <kevin.jahns@protonmail.com>
2026-09-01 15:33:26 +02:00

51 lines
2.3 KiB
Plaintext

# 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.
# Stores. Its own valkey and its own postgres database — the backend's live
# next to them and are never touched from here.
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
# publishes the JWKS the admin tokens it signs are verified against. The origin
# list is what a browser may open a websocket from — the frontend dev server.
COLLABORATION_BACKEND_BASE_URL=http://app-dev:8000
COLLABORATION_SERVER_ORIGIN=http://localhost:3000
# sent as X-Y-Provider-Key on the calls made to the backend; the same value as
# in `common`, which is where the backend reads the one it compares it to
Y_PROVIDER_API_KEY=yprovider-api-key
# Signs the calls made to the backend, which holds the public half. Generated
# by `make generate-secret-keys`, never committed.
YHUB_JWT_PRIVATE_KEY_FILE=/data/jwt/yhub-private.pem
# Soft migration: seed a room from the legacy Django/S3 document store the
# first time it is opened. The bucket read here is the backend's media one —
# in this stack the same minio, under the credentials of this server rather
# than the backend's own AWS_S3_* settings.
SOFT_MIGRATION=true
LEGACY_S3_ENDPOINT_URL=http://minio:9000
LEGACY_S3_ACCESS_KEY_ID=impress
LEGACY_S3_SECRET_ACCESS_KEY=password
# Document storage: where the blobs of a compaction are written. Off, they stay
# in yhub's postgres, which is what this stack runs. On, they go to object
# storage instead — here the same minio, in a bucket of its own, created
# versioned by compose so that flipping this to true exercises what a
# deployment does rather than a simpler case.
#
# The settings below are read whether or not the toggle is on: they are what
# attaches the S3 plugin, and the plugin is what can read back the objects a
# previous run wrote. Only the writing follows the toggle. See the "Document
# storage" section of src/yhub-server/README.md.
YHUB_S3_PERSISTENCE=false
YHUB_S3_ENDPOINT_URL=http://minio:9000
YHUB_S3_ACCESS_KEY_ID=impress
YHUB_S3_SECRET_ACCESS_KEY=password
YHUB_S3_BUCKET_NAME=yhub-storage