docs(vps): add Section 5 procedure for reflecting git pull updates on live tmpfs RAM mount, Caddy reload rules, and browser cache handling (v2.0.1)
This commit is contained in:
1 parent
c6c269a312
commit
e386af1160
2 files changed
+75
-35
No files matched your search
@@ -186,14 +186,35 @@ curl -o /dev/null -s -w "DNS: %{time_namelookup}s | TLS/QUIC: %{time_appconnect}
|
||||
|
||||
---
|
||||
|
||||
## 5. Ongoing Per-Repository Updates on the VPS
|
||||
## 5. Procedure for Reflecting Updated Content from `git pull` on `https://hyperstitionstud.io`
|
||||
|
||||
To pull and deploy updates from `git.libre.audio` for all repositories or a single repository:
|
||||
Because Caddy serves `https://hyperstitionstud.io` from the RAM-backed `tmpfs` mount (`/var/www/hyperstitionstud.io/repos/<repo>`) using pre-compressed `.br` (Brotli-11) and `.gz` (Gzip-9) sidecars rather than directly from the NVMe Git working trees (`/srv/hyperstitionstud.io/repos/<repo>`), reflecting updated Git content on the live site follows one of the two workflows below:
|
||||
|
||||
### 5.1 Workflow A: If You Already Ran `git pull` Manually in `/srv/hyperstitionstud.io/repos/<repo>`
|
||||
|
||||
Sync the updated working tree(s) into the RAM mount and regenerate the `.br` / `.gz` sidecars without fetching again:
|
||||
|
||||
```bash
|
||||
# Update all 6 repositories, run 6-gate audit, and sync to RAM:
|
||||
/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh --no-pull
|
||||
```
|
||||
|
||||
### 5.2 Workflow B: Pull from `git.libre.audio` and Update the Live RAM Mount in One Step
|
||||
|
||||
```bash
|
||||
# Update all 6 repositories at once, run 6-gate audit, sync to RAM, and pre-compress (.br / .gz):
|
||||
/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh all
|
||||
|
||||
# Or update a single repository in < 1.5 seconds:
|
||||
# Or update a single repository in < 1.5s (e.g., hyperstitionstudio-core or encyclopedia-knowledge-graph):
|
||||
/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh hyperstitionstudio-core
|
||||
/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh encyclopedia-knowledge-graph
|
||||
```
|
||||
*(Note: If a remote tag was force-updated earlier and `git fetch --tags` rejects it with `would clobber existing tag` before `hyperstitionstudio-core` has pulled commit `b767f8a`, run `git -C /srv/hyperstitionstud.io/repos/hyperstitionstudio-core fetch --force origin main --tags && git -C /srv/hyperstitionstud.io/repos/hyperstitionstudio-core merge --ff-only origin/main` once first).*
|
||||
|
||||
### 5.3 Caddy Reload & Browser Cache Rules
|
||||
|
||||
- **No Caddy reload is required** for content updates (`HTML`, `JS`, `JSON`, `PDFs`, `PNGs`)—Caddy serves the updated `.br`/`.gz`/raw files from `/var/www/hyperstitionstud.io/repos/` immediately as soon as `sync-vps-repos.sh` finishes.
|
||||
- **Only reload Caddy** if `/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/Caddyfile` itself changed:
|
||||
```bash
|
||||
sudo cp /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/Caddyfile /etc/caddy/Caddyfile && sudo systemctl reload caddy
|
||||
```
|
||||
- **Browser Cache Note:** `HTML`/`JS`/`JSON` routes carry `Cache-Control: public, max-age=300` (5 minutes); press `Ctrl+Shift+R` (`Cmd+Shift+R` on macOS) in your browser to bypass the 5-minute client cache immediately after syncing.
|
||||
Reference in new issue
Block a user