feat(docker): run Handle server as a separate service (not embedded) - #1455
Open
MatusBeke wants to merge 1 commit into
Open
feat(docker): run Handle server as a separate service (not embedded)#1455MatusBeke wants to merge 1 commit into
MatusBeke wants to merge 1 commit into
Conversation
Adds docker/docker-compose-handle.yml, an overlay that:
* overrides the backend entrypoint to STOP starting the embedded Handle
server (drops the /dspace/bin/start-handle-server line),
* enables the backend remote-resolver endpoints
(handle.remote-resolver.enabled = true),
* runs a standalone dspace-handle-server service (image from
dataquest-dev/docker-handle-server) that resolves via the backend REST API
and waits for the backend before starting.
The Handle server no longer runs inside the backend and has no direct DB
access. Include this file LAST so its entrypoint override wins.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a Docker Compose overlay to run the CNRI Handle server as a standalone service, while configuring the DSpace backend to use the remote-resolver REST endpoints instead of starting the embedded Handle server.
Changes:
- Adds
docker/docker-compose-handle.ymloverlay that disables embedded Handle startup by overriding the backendentrypoint. - Enables remote-resolver endpoints via
handle.remote-resolver.enabled = true(env override). - Adds a
dspace-handle-serverservice that waits for the backend and resolves through the backend REST API.
Suppressed comments (2)
docker/docker-compose-handle.yml:37
- This overlay stops the embedded Handle server, but (unless overridden here) the
dspaceservice will still publish the embedded Handle ports inherited from docker-compose-rest.yml. That leaves unused ports exposed and will conflict oncedspace-handle-serverpublishes the replacement ports (Compose will fail with “port is already allocated”). Overridedspace.portsin this overlay to only publish the backend + debug ports.
dspace:
environment:
handle__P__remote__D__resolver__P__enabled: 'true'
entrypoint:
- /bin/bash
docker/docker-compose-handle.yml:60
- Defaulting
HANDLE_HTTP_PORTto 8000 will conflict with the backend’s published debug port (800${INSTANCE}, typically 8000 when INSTANCE=0). Use a non-conflicting default (and ideally align with the embedded Handle HTTP port previously exposed by docker-compose-rest.yml: 8010 for INSTANCE=0).
- published: ${HANDLE_HTTP_PORT:-8000}
target: 8000
host_ip: ${HOST_IP:-127.0.0.1}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+26
to
+29
| networks: | ||
| dspacenet: | ||
|
|
||
| services: |
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.
What
Runs the DSpace Handle server as a separate service instead of the one embedded
in the backend. This is the "take the Handle server out of the backend, keep only
the standalone one" change on the deployment side.
Adds one file —
docker/docker-compose-handle.yml— an overlay that:dspaceentrypoint with the same script asdocker-compose-rest.ymlbut with the/dspace/bin/start-handle-serverline removed.handle.remote-resolver.enabled = true(
/server/listprefixes,/listhandles,/resolve).dspace-handle-serverservice (image fromdataquest-dev/docker-handle-server) that resolves through the backend REST API,waits for the backend on startup, and never touches the database.
Usage
Include the overlay last (its entrypoint override must win; the network ipam from
docker-compose-rest.ymlis preserved):Ports/endpoint are configurable via
.env(HANDLE_HTTP_PORT,HANDLE_NATIVE_PORT,DSPACE_HANDLE_ENDPOINT,DSPACE_HANDLE_IMAGE).Tested
docker compose configmerges cleanly: backend entrypoint no longer containsstart-handle-server, resolver is enabled, the standalone service is added, and thenetwork subnet from
docker-compose-rest.ymlis preserved.Handle server loaded all prefixes from the backend and resolved handles
(
responseCode: 1), verified in real time (a handle inserted into Postgres wasimmediately resolvable through the standalone server).
Related
dataquest-dev/docker-handle-server#3— makes that image clone-and-run friendly(default remote-resolver
config.dct,.env.example, LF fix). This overlay workswith the current published image regardless, patching the config at container start.
Notes / follow-ups
file is included.