Skip to content

[dtq-dev-93] Port the Handle server, S3 and log settings of the 7.x backend compose files - #1763

Open
milanmajchrak wants to merge 3 commits into
dtq-dev-93from
93/fe-docker-ops
Open

milanmajchrak wants to merge 3 commits into
dtq-dev-93from
93/fe-docker-ops

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

References

  • Settings from docker/docker-compose-rest.yml and docker/cli.yml on dtq-dev: S3 from eef127f, Handle server ports from 533d8d1. The chown in the deploy is from Use user dspace for the dspace container #1124.
  • Needs DSpace PR 1775 from 93/be-docker-ops (images run as dspace, Handle HTTP port 8010). Merge this one right after that image is built. A deploy in between runs the new image on root-owned volumes without the chown.

Description

The backend compose files get the S3 variables, the log volumes and the Handle server ports from 7.x. The deploy gives the volumes to the dspace user that the backend now runs as.

Instructions for Reviewers

List of changes in this PR:

  • docker-compose-rest.yml, dspace service: the 7.x S3_* variables with the same defaults (S3 off). pathStyleAccessEnabled is gone, because v9 always uses path style when an endpoint is set. These variables override the same keys in local.cfg, as in 7.x.
  • Same service: ports 2641/tcp, 2641/udp and 8010 for the Handle server, and the volumes dspace_logs (/dspace/log) and handle_server (/dspace/handle-server). The entrypoint starts the Handle server only when make-handle-config has written config.dct.
  • dspacesolr: volume solr_logs on /var/solr/logs.
  • cli.yml: the same S3 variables and a dspace_cli_logs volume.
  • deploy.yml: chown -R dspace:dspace /dspace/assetstore after docker cp, as on dtq-dev. It is skipped on an image without the dspace user, which runs as root anyway.
  • Same file: after up -d, the 8603 deploy gives the volumes made by the root image to dspace and restarts the container, but only when a file there is not owned by dspace yet. If the container cannot be reached, the step fails. The probe warns when 2641 or 8010 are not replaced by the instance overlay.

To turn on the Handle server on an instance: docker exec dspace<INSTANCE> /dspace/bin/make-handle-config, then restart the container. The 8603 overlay replaces the ports with ports: !override, so it must publish the Handle ports itself.

How to test:

  • docker compose -f docker/docker-compose.yml -f docker/docker-compose-rest.yml config and docker compose -f docker/docker-compose-rest.yml -f docker/cli.yml config are valid and show the new variables, ports and volumes.
  • Deploy 8603 with import. The import job passes the copy assetstore step, and uploading a file works.
  • Deploy 8603 again without import. The log shows no chown and no restart this time.

Codex review (gpt-6.2-sol, high), 2 rounds: 2 findings fixed (the import chown failed on an image without the dspace user, a failed ownership probe passed as clean). The last round found 4 more, not changed in this PR:

  • The volume repair runs after up -d. If the container is already crash-looping, the deploy fails before the repair.
  • Unset S3_* variables override S3 settings in local.cfg. 7.x does the same.
  • The new CLI log volume is not part of the repair.
  • The Handle ports are published even when the Handle server is off. 7.x does the same.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

milanmajchrak and others added 3 commits November 26, 2026 15:47
The backend compose files get the S3 variables, log volumes and Handle server ports of the 7.x files.
The deploy hands the copied assetstore to the dspace user, because the backend image no longer runs as root.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The backend image now uses 8010 for the Handle server HTTP port, and runs as dspace,
so the deploy gives the volumes left by the root image to that user.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The chown runs only when a volume still has files not owned by dspace, and the restart
lets the webapp open its log files again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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