Phase 1: media (object storage) + background worker #8

Merged
justin merged 1 commits from phase1-media into main 2026-06-06 21:46:35 -04:00
Owner

Media model + ObjectStore (MinIO) + upload/list/delete, and the worker container running the scheduled soft-delete purge.

Media model + ObjectStore (MinIO) + upload/list/delete, and the worker container running the scheduled soft-delete purge.
justin added 1 commit 2026-06-06 21:46:35 -04:00
Media model + migration; an ObjectStore interface with an S3/MinIO (boto3) implementation behind the service layer. Upload (multipart) stores bytes in object storage + a metadata row (checksum, size, content-type, optional attach to person/event/source); list returns presigned URLs; delete is soft. Editor-gated, privacy-filtered, audited. 24 tests pass (object store faked).

Introduces the worker container (same image, 'python -m app.worker'): its first job is the scheduled 30-day soft-delete purge across tables + media object cleanup. Compose gains worker + S3 env on backend/worker; dev override builds the worker too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Paul <justin@jpaul.me>
justin merged commit 660130f007 into main 2026-06-06 21:46:35 -04:00
Sign in to join this conversation.