Skip to content

chore(dev): run hocuspocus from source in dev compose, drop legacy image#23216

Open
wielinde wants to merge 1 commit into
devfrom
chore/dev-hocuspocus-from-source
Open

chore(dev): run hocuspocus from source in dev compose, drop legacy image#23216
wielinde wants to merge 1 commit into
devfrom
chore/dev-hocuspocus-from-source

Conversation

@wielinde
Copy link
Copy Markdown
Member

@wielinde wielinde commented May 14, 2026

Summary

Local Docker Compose Dev setup should always exercise the current code of the hocuspocus extension, not a pre-built image that lags behind. This PR replaces the legacy image-based hocuspocus dev setup with a service that mounts the live source.

It basically takes what was in docker/dev/hocuspocus/docker-compose.override.example.yml and moves it to the core docker-compose.yml.

It also extends it to work out of the box with a TLS setup.

Changes

  • New hocuspocus service in docker-compose.yml using node:22-alpine, bind-mounting ./extensions/op-blocknote-hocuspocus and running npm run dev (tsx watch).
  • backend now depends_on: hocuspocus.
  • hocuspocus-test switched from openproject/hocuspocus:latest to the same anchor — test and dev paths converge.
  • Removed docker/dev/hocuspocus/ (obsolete image-based override and example).
  • Traefik routing for hocuspocus.local intentionally stays out of the main compose (matches the convention used for backend/frontend); devs running the TLS proxy add it to their personal docker-compose.override.yml.

Test plan

  • docker compose up -d hocuspocus brings the container up; logs show Hocuspocus v3.4.4 running and Ready. with OpenProjectApi + Logger extensions registered
  • Frontend connects: Loaded document "https://openproject.local/api/v3/documents/<id>" and onTokenSync traffic visible in hocuspocus logs
  • hocuspocus-test works for the existing test stack

Refs

Local devs should always exercise the current code of the hocuspocus
extension, not a pre-built image that lags behind. Add a `hocuspocus`
dev service to the main compose file using `node:22-alpine`, bind-mount
`./extensions/op-blocknote-hocuspocus` and run `npm run dev`. Remove the
obsolete `docker/dev/hocuspocus/` directory (image-based override).

`backend` now depends on `hocuspocus`, and `hocuspocus-test` reuses the
same anchor so test and dev paths converge.

Traefik routing for `hocuspocus.local` stays out of the main compose
(matches the convention used for backend/frontend) — devs running TLS
proxy add it to their personal `docker-compose.override.yml`.

Refs: https://community.openproject.org/wp/74654

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant