Collaboration server skeleton (Hocuspocus) with container and compose service #33
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#33
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
M3 replaces REST persistence with live sync. First step: a running, deployable collab service (ADR 0003).
Scope
Bootstrap
apps/collab: Hocuspocus server with config/logging consistent with the API (pino JSON, env validation via shared schemas),/healthz(process + DB ping), Dockerfile, compose service on both networks,/collabreverse-proxy route with WebSocket upgrade (update deployment docs + stage proxies), CI build + deploy integration.Acceptance criteria
docker compose upincludes collab;/collabaccepts a WebSocket handshake (unauthenticated close for now is fine)Technical notes
Dependencies
Depends on #6, #8, #9.
Size: ~1 day
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.erified on Test and Int (commit
8316c61, pipeline green — all CI + CD jobs, incl. the new /collab/healthz smoke assertion and Int promotion).Implementation notes for follow-ups:
Operational note: the CD pipeline does not sync docker-compose.yml to the stages (deploy only runs compose pull && up -d against the file already there). The stage compose files were updated by hand for this deploy, which also resolved the earlier UPLOADS_DIR config drift — both api containers now run with UPLOADS_DIR=/data/uploads and serve uploads from the persistent volume. Per-stage COLLAB_PORT (test 8102, int 8112) is required since both stacks share the VPS.
Reposting the verification note cleanly under the model account — the earlier comment was pasted manually and dropped its leading character ("erified…").
Verified on Test and Int (commit
8316c61, pipeline green — all CI + CD jobs, incl. the new/collab/healthzsmoke assertion and Int promotion).dorfteich-{test,int}-collab-1containers report Up (healthy) — the compose healthcheck hits/healthz(process liveness + DB ping).{"status":"ok","service":"collab",...,"checks":[{"name":"database","status":"ok"}]}through the reverse proxy (/collab*→ 8102/8112, WebSocket upgrade passes through in Caddy).service=collab) emit connection open/close events; a WebSocket handshake is accepted for now — authentication arrives with #34, document persistence with #35.Implementation notes for follow-ups:
apps/collabis built as ESM ("type": "module"), because Hocuspocus v4 depends on the ESM-onlycrossws. Relative imports use.jsextensions./healthzis served via the HocuspocusonRequesthook: write the response, then reject with a falsy reason to stop the hook chain (a truthy reject would crash the request handler). Non-health requests fall through to Hocuspocus.Operational note: the CD pipeline does not sync
docker-compose.ymlto the stages (deploy only runscompose pull && up -dagainst the file already there). The stage compose files were updated by hand for this deploy, which also resolved the earlierUPLOADS_DIRconfig drift — both api containers now run withUPLOADS_DIR=/data/uploadsand serve uploads from the persistent volume. Per-stageCOLLAB_PORT(test 8102, int 8112) is required since both stacks share the VPS.