Move physical file facts out of the photos table into an objects ledger:
- objects / photo_objects / variant_jobs tables (migration 000008)
- drop storage_key/thumb_key/preview_key/size/width/height/mime_type from
photos (migration 000009); they are derived via joins to the original object
- album-free storage keys: objects/{id}/{role}.{ext}
- explicit GC via pending/ready/deleting states; objects deleted only when no
photo references them
- background worker drives variant generation (durable variant_jobs) and GC
- copy/move are metadata-only; storage objects are shared between photos
- remove unused storage.DeletePrefix
Non-destructive to the external JSON API: size/dimensions/mime and URLs are
still returned, just sourced from the object layer.
OpenSpec change: media-object-layer
36 lines
691 B
Bash
36 lines
691 B
Bash
# PostgreSQL (pg.localnet)
|
|
PG_HOST=pg.localnet
|
|
PG_PORT=5432
|
|
PG_USER=album
|
|
PG_PASSWORD=change_me
|
|
PG_DATABASE=shared_album
|
|
PG_SSLMODE=disable
|
|
|
|
# S3 (Garage on s3.localnet)
|
|
S3_ENDPOINT=http://s3.localnet:3900
|
|
S3_REGION=garage
|
|
S3_ACCESS_KEY=GKchange_me
|
|
S3_SECRET_KEY=change_me
|
|
S3_BUCKET=galo-data
|
|
S3_USE_PATH_STYLE=true
|
|
S3_PUBLIC_URL=http://s3.localnet:3900/galo-data
|
|
S3_PRESIGN_TTL=1h
|
|
|
|
# Auth
|
|
JWT_SECRET=change_me_long_random
|
|
JWT_ACCESS_TTL=15m
|
|
JWT_REFRESH_TTL=720h
|
|
|
|
# Server
|
|
HTTP_ADDR=:8080
|
|
APP_BASE_URL=http://localhost:8080
|
|
|
|
# SSE
|
|
SSE_HEARTBEAT_INTERVAL=25s
|
|
SSE_CLIENT_BUFFER=64
|
|
|
|
# Background worker (variant generation + object GC)
|
|
WORKER_INTERVAL=5s
|
|
WORKER_BATCH=10
|
|
WORKER_PENDING_TTL=10m
|