forked from 0xWheatyz/SPARC
Document patent PDF volume mount requirement and consider object storage for containerized deployments #1052
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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):
README.mdanddocker-compose.ymlexplaining that thepatents/directory must be backed by a named Docker volume or host-path mount.docker-compose.ymlso it works out of the box.Phase 2 (optional enhancement):
3. Introduce an
PDF_STORAGE_BACKENDenv var (local|s3).4. When set to
s3, upload to S3/MinIO usingboto3and retrieve by key instead of local path.5. Document
S3_BUCKET,S3_ENDPOINT_URL,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYin.env.example.Acceptance criteria
docker compose uppersists PDFs across container restarts.README.mdexplains the storage requirement.PDF_STORAGE_BACKEND=s3stores and retrieves PDFs from S3/MinIO.Triage by @AI-Manager
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/patentsis configured as a bind mount in docker-compose.yml.Phase 2 (S3/MinIO):
storage.pyimplementsS3StorageBackendusing boto3.config.pyreadsSTORAGE_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 thes3profile.