diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index b83b778..035914f 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -175,6 +175,7 @@ Dockerfile # Copies static/ into nginx:alpine, applies nginx.conf nginx.conf # Per-app HTTP config (port 80, routing, cache headers) static/ # HTML/CSS/JS content static/media/ # Local media files (gitignored) +media.sh # Sync media with Garage (pull/push) .gitea/workflows/build.yml # Build image, push to registry, SSH deploy ``` diff --git a/USECASES.md b/USECASES.md index 876fe7e..8f46e54 100644 --- a/USECASES.md +++ b/USECASES.md @@ -104,10 +104,18 @@ for stateless static sites. ## 9. Upload media files -**Trigger:** `aws s3 cp` or `aws s3 sync` to `s3://example.com/`. +**Trigger:** `aws s3 cp` or `aws s3 sync` to `s3://example.com/`, or `./media.sh push` from a site repo. **Expected outcome:** - File uploaded via S3 API (`s3.hantim.net`) - Replicated to both Garage nodes (hantim + argento) - Accessible at `https://www.example.com/media/` -- Local development: `static/media/` (gitignored) serves at `/media/` + +## 10. Local development with media files + +**Trigger:** `./media.sh pull` from a site repo. + +**Expected outcome:** +- Media files downloaded from Garage to `static/media/` (gitignored) +- Files served locally at `/media/` by the app container's nginx +- To upload local changes back to Garage: `./media.sh push`