Document volume mount requirement for patents/ directory or add S3/MinIO storage backend #169

Closed
opened 2026-03-26 19:22:19 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 / Backend / Patent PDF storage

Patent PDFs are currently saved to a local patents/ directory. In containerized (Docker/Kubernetes) deployments this directory is ephemeral and PDFs are lost on container restart unless a volume is explicitly mounted.

Work Required

Choose one of the following approaches (preference: document first, implement object storage as follow-up):

Option A (documentation, smaller scope):

  • Add a prominent note to docker-compose.yml and README explaining that patents/ must be bind-mounted or backed by a named volume for persistence
  • Add a named volume entry for patents/ in docker-compose.yml so the default setup is already persistent
  • Add a warning log at startup if the patents/ directory is not a mounted volume (best-effort check)

Option B (object storage, larger scope):

  • Add optional S3/MinIO backend controlled by PDF_STORAGE_BACKEND=local|s3 env var
  • When s3, use boto3 to PUT/GET PDFs from a configured bucket
  • Provide MINIO_ENDPOINT, MINIO_ACCESS_KEY, MINIO_SECRET_KEY, MINIO_BUCKET env vars in config.py

Acceptance Criteria

  • docker-compose.yml either has a named volume for patents/ or clear comments directing operators to add one
  • README documents the storage requirement
  • (Option B only) PDFs are stored and retrieved from S3/MinIO when the env var is set
  • (Option B only) Unit tests cover the storage abstraction layer

References

Roadmap: P2 -- Backend -- Patent PDF storage

## Context Roadmap item: P2 / Backend / Patent PDF storage Patent PDFs are currently saved to a local `patents/` directory. In containerized (Docker/Kubernetes) deployments this directory is ephemeral and PDFs are lost on container restart unless a volume is explicitly mounted. ## Work Required Choose one of the following approaches (preference: document first, implement object storage as follow-up): **Option A (documentation, smaller scope):** - Add a prominent note to `docker-compose.yml` and `README` explaining that `patents/` must be bind-mounted or backed by a named volume for persistence - Add a named volume entry for `patents/` in `docker-compose.yml` so the default setup is already persistent - Add a warning log at startup if the `patents/` directory is not a mounted volume (best-effort check) **Option B (object storage, larger scope):** - Add optional S3/MinIO backend controlled by `PDF_STORAGE_BACKEND=local|s3` env var - When `s3`, use `boto3` to PUT/GET PDFs from a configured bucket - Provide `MINIO_ENDPOINT`, `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`, `MINIO_BUCKET` env vars in `config.py` ## Acceptance Criteria - [ ] `docker-compose.yml` either has a named volume for `patents/` or clear comments directing operators to add one - [ ] README documents the storage requirement - [ ] (Option B only) PDFs are stored and retrieved from S3/MinIO when the env var is set - [ ] (Option B only) Unit tests cover the storage abstraction layer ## References Roadmap: P2 -- Backend -- Patent PDF storage
AI-Manager added the P2agent-readymedium labels 2026-03-26 19:22:40 +00:00
Author
Owner

Closing: already implemented on main. The feature/s3-storage branch was merged. SPARC/storage.py provides S3/MinIO backend. docker-compose.yml includes optional MinIO service. .env.example documents STORAGE_BACKEND, S3_BUCKET, S3_ENDPOINT_URL, and AWS credentials.

Closing: already implemented on main. The feature/s3-storage branch was merged. SPARC/storage.py provides S3/MinIO backend. docker-compose.yml includes optional MinIO service. .env.example documents STORAGE_BACKEND, S3_BUCKET, S3_ENDPOINT_URL, and AWS credentials.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#169