update to garage sync
This commit is contained in:
@@ -175,6 +175,7 @@ Dockerfile # Copies static/ into nginx:alpine, applies nginx.conf
|
|||||||
nginx.conf # Per-app HTTP config (port 80, routing, cache headers)
|
nginx.conf # Per-app HTTP config (port 80, routing, cache headers)
|
||||||
static/ # HTML/CSS/JS content
|
static/ # HTML/CSS/JS content
|
||||||
static/media/ # Local media files (gitignored)
|
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
|
.gitea/workflows/build.yml # Build image, push to registry, SSH deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+10
-2
@@ -104,10 +104,18 @@ for stateless static sites.
|
|||||||
|
|
||||||
## 9. Upload media files
|
## 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:**
|
**Expected outcome:**
|
||||||
- File uploaded via S3 API (`s3.hantim.net`)
|
- File uploaded via S3 API (`s3.hantim.net`)
|
||||||
- Replicated to both Garage nodes (hantim + argento)
|
- Replicated to both Garage nodes (hantim + argento)
|
||||||
- Accessible at `https://www.example.com/media/<path>`
|
- Accessible at `https://www.example.com/media/<path>`
|
||||||
- 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`
|
||||||
|
|||||||
Reference in New Issue
Block a user