chore(dev): run hocuspocus from source in dev compose, drop legacy image#23216
Open
wielinde wants to merge 1 commit into
Open
chore(dev): run hocuspocus from source in dev compose, drop legacy image#23216wielinde wants to merge 1 commit into
wielinde wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ymland moves it to the coredocker-compose.yml.It also extends it to work out of the box with a TLS setup.
Changes
hocuspocusservice indocker-compose.ymlusingnode:22-alpine, bind-mounting./extensions/op-blocknote-hocuspocusand runningnpm run dev(tsx watch).backendnowdepends_on: hocuspocus.hocuspocus-testswitched fromopenproject/hocuspocus:latestto the same anchor — test and dev paths converge.docker/dev/hocuspocus/(obsolete image-based override and example).hocuspocus.localintentionally stays out of the main compose (matches the convention used for backend/frontend); devs running the TLS proxy add it to their personaldocker-compose.override.yml.Test plan
docker compose up -d hocuspocusbrings the container up; logs showHocuspocus v3.4.4 runningandReady.withOpenProjectApi+Loggerextensions registeredLoaded document "https://openproject.local/api/v3/documents/<id>"andonTokenSynctraffic visible in hocuspocus logshocuspocus-testworks for the existing test stackRefs