Repository navigation
Conversation
The Downloader groups an export by each file's memberOf, which the RO-Crate API's File leaves out,
so /api/files now adds it as {id, name}, as arocapi gives entities, or null.
Co-Authored-By: Claude <noreply@anthropic.com>
The production stack runs the Downloader behind Caddy as the API's downloader client, calling the API inside the stack; Caddy takes DOMAIN as an alias so sign-in needs no hairpin NAT. Development gets it under the downloader profile, with moto standing in for S3 and SES. deploy/*.env is now ignored, as ldacapi.env never was. Co-Authored-By: Claude <noreply@anthropic.com>
johnf
marked this pull request as ready for review
November 26, 2026 05:42
This was referenced Nov 26, 2026
…OMAIN The zips are kept in versitygw over DOWNLOADS_DIR, with metadata in a sidecar directory so NFS works, instead of AWS S3. The bucket downloader on DOMAIN puts the signed links at https://downloader.DOMAIN/exports/, so the Downloader now lives at downloader.DOMAIN and DOWNLOADER_DOMAIN is gone. A setup service creates the bucket and a cleanup service deletes zips two days old. Development uses versitygw too, with moto only for SES. Co-Authored-By: Claude <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.
Adds the CrateWorks Downloader to the production stack at
downloader.<DOMAIN>(e.g.downloader.dev.ldaca.edu.au), with its zips kept in versitygw rather than AWS, and to development under thedownloadercompose profile.Changes
/api/filesgives each filememberOf: {id, name}, the same shape arocapi gives entities, ornull. The Downloader groups exports by it and refuses any export without it. Proposed upstream in Include memberOf in each file's response crate-works/arocapi#153 and Add memberOf to File crate-works/ro-crate-api#45;src/files.tsgoes once arocapi does it.deploy/):downloaderservice, pinned to1.15.2because the image has no major tag yet (Publish major and minor image tags crate-works/downloader#15). The API registers it as the confidentialdownloaderclient, withDOWNLOADER_CLIENT_SECRET. It calls the API athttp://api:8080/api, inside the stack.s3: versitygwv1.11.0overDOWNLOADS_DIR, keeping metadata in a sidecar directory so NFS works. The bucket isdownloaderonDOMAIN, so signed links arehttps://downloader.<DOMAIN>/exports/…. Caddy sends/exports/*there without cookies, and everything else to the app. Only the Downloader holds the key (DOWNLOADER_S3_SECRET).downloader-setupcreates the bucket idempotently, anddownloads-cleanupdeletes zips two days old.DOMAINanddownloader.<DOMAIN>as network aliases, so sign-in and uploads reach it without hairpin NAT.DOWNLOADER_DOMAINis gone: the hostname has to bedownloader.<DOMAIN>for the bucket addressing to work.docker compose --profile downloader up -druns the Downloader onlocalhost:7000againstpnpm dev, with versitygw for the zips and moto for SES.deploy/*.envis now gitignored.ldacapi.envnever was.Testing
pnpm lintandpnpm testpass with full coverage. There are tests for the filememberOfand for a confidential client that posts its secret without PKCE, as the Downloader does.ldaca.localhost, versitygw, setup, cleanup):https://downloader.ldaca.localhost/exports/…link served uncompressed, with HSTS andnosniffdocker compose configpasses for both stacks, andcaddy validatepasses.Still to do
.envalready has the secrets andDOWNLOADS_DIR, on local disk because the NFS mount there is read-only. The branch isn't deployed there yet.