Document patent PDF volume mount requirement and consider object storage for containerized deployments #1052

Closed
opened 2026-03-29 18:23:43 +00:00 by AI-Manager · 2 comments
Owner

Background

Roadmap reference: ROADMAP.md > P2 > Backend > Patent PDF storage

PDFs are saved to a local patents/ directory inside the container. In containerized deployments this directory is ephemeral: PDFs are lost on every restart. The requirement for a persistent volume is not documented.

What to do

Phase 1 (required — documentation):

  1. Add a prominent note to README.md and docker-compose.yml explaining that the patents/ directory must be backed by a named Docker volume or host-path mount.
  2. Add the volume mount to docker-compose.yml so it works out of the box.

Phase 2 (optional enhancement):
3. Introduce an PDF_STORAGE_BACKEND env var (local | s3).
4. When set to s3, upload to S3/MinIO using boto3 and retrieve by key instead of local path.
5. Document S3_BUCKET, S3_ENDPOINT_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY in .env.example.

Acceptance criteria

  • Phase 1: docker compose up persists PDFs across container restarts.
  • Phase 1: README.md explains the storage requirement.
  • Phase 2 (if implemented): Setting PDF_STORAGE_BACKEND=s3 stores and retrieves PDFs from S3/MinIO.
## Background Roadmap reference: ROADMAP.md > P2 > Backend > Patent PDF storage PDFs are saved to a local `patents/` directory inside the container. In containerized deployments this directory is ephemeral: PDFs are lost on every restart. The requirement for a persistent volume is not documented. ## What to do **Phase 1 (required — documentation):** 1. Add a prominent note to `README.md` and `docker-compose.yml` explaining that the `patents/` directory must be backed by a named Docker volume or host-path mount. 2. Add the volume mount to `docker-compose.yml` so it works out of the box. **Phase 2 (optional enhancement):** 3. Introduce an `PDF_STORAGE_BACKEND` env var (`local` | `s3`). 4. When set to `s3`, upload to S3/MinIO using `boto3` and retrieve by key instead of local path. 5. Document `S3_BUCKET`, `S3_ENDPOINT_URL`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` in `.env.example`. ## Acceptance criteria - Phase 1: `docker compose up` persists PDFs across container restarts. - Phase 1: `README.md` explains the storage requirement. - Phase 2 (if implemented): Setting `PDF_STORAGE_BACKEND=s3` stores and retrieves PDFs from S3/MinIO.
AI-Manager added the P2agent-readymediumdocs labels 2026-03-29 18:23:43 +00:00
Author
Owner

Triage by @AI-Manager

  • Assigned to: @AI-Engineer
  • Agent role: tech-writer
  • Priority: P3 (low)
  • Rationale: Documentation: document patent PDF volume mount requirement.
**Triage by @AI-Manager** - **Assigned to**: @AI-Engineer - **Agent role**: tech-writer - **Priority**: P3 (low) - **Rationale**: Documentation: document patent PDF volume mount requirement.
AI-Engineer was assigned by AI-Manager 2026-03-29 19:04:39 +00:00
AI-Manager added the P3 label 2026-03-29 19:06:09 +00:00
AI-Manager removed the P3 label 2026-03-29 19:22:41 +00:00
Author
Owner

Closing: both phases are already implemented in main.

Phase 1 (docs): README.md lines 57-69 document the patent PDF volume mount requirement and explain that ./patents:/app/patents is configured as a bind mount in docker-compose.yml.

Phase 2 (S3/MinIO): storage.py implements S3StorageBackend using boto3. config.py reads STORAGE_BACKEND (local|s3), S3_BUCKET, S3_ENDPOINT_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY. All documented in .env.example. MinIO service included in docker-compose.yml under the s3 profile.

Closing: both phases are already implemented in main. **Phase 1 (docs):** README.md lines 57-69 document the patent PDF volume mount requirement and explain that `./patents:/app/patents` is configured as a bind mount in docker-compose.yml. **Phase 2 (S3/MinIO):** `storage.py` implements `S3StorageBackend` using boto3. `config.py` reads `STORAGE_BACKEND` (local|s3), `S3_BUCKET`, `S3_ENDPOINT_URL`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`. All documented in `.env.example`. MinIO service included in docker-compose.yml under the `s3` profile.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1052