Skip to content

fix(deploy): prod compose actually persists Y.Doc rooms#228

Open
schnsrw wants to merge 1 commit into
mainfrom
fix/prod-compose-persistence
Open

fix(deploy): prod compose actually persists Y.Doc rooms#228
schnsrw wants to merge 1 commit into
mainfrom
fix/prod-compose-persistence

Conversation

@schnsrw

@schnsrw schnsrw commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

The prod compose promised "persist Y.Doc room snapshots" in a comment but only set CASUAL_STORAGE (the file host); Y.Doc room storage is selected by REDIS_URL, which was commented out — so live rooms ran in-memory and were dropped on every restart.

  • Adds a redis service (RDB persistence + healthcheck) and wires REDIS_URL / CASUAL_REDIS_PREFIX so rooms survive restarts.
  • Sets NODE_ENV=production (activates the collab server's new refuse-to-boot guard against ephemeral prod storage) and TRUST_PROXY=true (Caddy terminates TLS, so per-IP rate limiting must key off the forwarded client IP).
  • Adds an app /health healthcheck so the proxy waits for readiness.

Pairs with CasualOffice/collab#4 (the server-side durability + security fixes). docker compose config validates.

The prod compose commented "persist Y.Doc room snapshots" but only set
CASUAL_STORAGE (the file host) — Y.Doc ROOM storage is selected by REDIS_URL,
which was commented out, so live rooms ran in-memory and were dropped on every
restart. Adds a redis service (with RDB persistence + healthcheck) and wires
REDIS_URL/CASUAL_REDIS_PREFIX so rooms actually survive restarts.

Also sets NODE_ENV=production (activating the collab server's new refuse-to-boot
guard against ephemeral prod storage) and TRUST_PROXY=true (Caddy terminates
TLS, so per-IP rate limiting must key off the forwarded client IP). Adds an
app healthcheck hitting /health so the proxy waits for readiness.

Pairs with CasualOffice/collab#4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant