[object Object]

← back to All Designerwallcoverings

Document targeted-rsync deploy guardrail (no full-tree --delete on this repo)

f78c6377ed7b2d1b05a2ebedfc20bc3d7c151d27 · 2026-07-08 09:01:29 -0700 · Steve

Files touched

Diff

commit f78c6377ed7b2d1b05a2ebedfc20bc3d7c151d27
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 8 09:01:29 2026 -0700

    Document targeted-rsync deploy guardrail (no full-tree --delete on this repo)
---
 .deploy.conf | 28 ++++++++++++++++++++++++++++
 CLAUDE.md    | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/.deploy.conf b/.deploy.conf
index d8972c8..e017816 100644
--- a/.deploy.conf
+++ b/.deploy.conf
@@ -1,3 +1,31 @@
+# ============================================================================
+# DEPLOY GUARDRAIL — READ BEFORE DEPLOYING THIS REPO
+# ============================================================================
+# DO NOT use the full-tree /deploy skill (~/Projects/_shared/scripts/deploy.sh,
+# which runs `rsync -az --delete`) on this repo. The full-tree --delete is UNSAFE
+# here.
+#
+# WHY: prod generates its OWN live artifacts that do NOT exist locally —
+#   data/microsites.json  (written by the microsite crawler every 10 min)
+#   data/vendors.json     (live-crawl artifact)
+# plus prod-only backup files. A full-tree `rsync --delete` would overwrite these
+# with stale local copies OR delete them outright, taking down /api/microsites and
+# the live directory.
+#
+# CORRECT METHOD — TARGETED single-file rsync of ONLY the changed file(s):
+#   1) rsync just the file(s) you changed to prod:
+#      rsync -avz public/index.html root@45.61.58.125:/root/Projects/all-designerwallcoverings/public/index.html
+#   2) reload + persist pm2:
+#      ssh root@45.61.58.125 'pm2 reload all-designerwallcoverings && pm2 save'
+#   3) smoke-test:
+#      - /healthz should return 200:
+#        curl -s -o /dev/null -w '%{http_code}' http://45.61.58.125:9958/healthz   # expect 200
+#      - public root should return 401 (the HEALTHY gated signal, NOT an outage):
+#        curl -s -o /dev/null -w '%{http_code}' https://all.designerwallcoverings.com/   # expect 401
+#
+# See the "## Deploy" section of this repo's CLAUDE.md for the same note.
+# Deploy to this public, gated surface is Steve-gated — build+stage, then ask.
+# ============================================================================
 PROJECT_NAME=all-designerwallcoverings
 DEPLOY_PATH=/root/Projects/all-designerwallcoverings
 HEALTH_URL=http://127.0.0.1:9958/healthz
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..c359d93
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,46 @@
+# all-designerwallcoverings
+
+Fleet aggregator for `all.designerwallcoverings.com` — the whole-catalog search
+grid + the live microsite directory. Node http server on port **9958** (in-RAM
+product rows + `/api/products` + `/api/facets` + `/api/vendors` + `/api/microsites`;
+Basic-Auth gate `admin/DW2024!`, override `BASIC_AUTH=user:pass`, `/healthz` open).
+
+Prod = Kamatera `root@45.61.58.125`, pm2 `all-designerwallcoverings` :9958, behind
+Cloudflare. The `401` from the public root IS the healthy-gated signal, not an outage.
+
+## Deploy
+
+**DO NOT use the full-tree `/deploy` skill on this repo.** The canonical deploy
+script (`~/Projects/_shared/scripts/deploy.sh`) runs `rsync -az --delete` full-tree,
+which is UNSAFE here.
+
+**WHY:** prod generates its OWN live-crawl artifacts that do NOT exist locally —
+`data/microsites.json` and `data/vendors.json`, written by the microsite crawler
+every 10 min — plus prod-only backup files. A full-tree `rsync --delete` would
+overwrite these with stale local copies OR delete them entirely, taking down
+`/api/microsites` and the live directory.
+
+**CORRECT METHOD — targeted single-file rsync of ONLY the changed file(s):**
+
+1. rsync just the changed file(s) to prod:
+   ```sh
+   rsync -avz public/index.html root@45.61.58.125:/root/Projects/all-designerwallcoverings/public/index.html
+   ```
+2. reload + persist pm2:
+   ```sh
+   ssh root@45.61.58.125 'pm2 reload all-designerwallcoverings && pm2 save'
+   ```
+3. smoke-test:
+   ```sh
+   # /healthz must return 200
+   curl -s -o /dev/null -w '%{http_code}' http://45.61.58.125:9958/healthz            # expect 200
+   # public root must return 401 (the HEALTHY gated signal, NOT an outage)
+   curl -s -o /dev/null -w '%{http_code}' https://all.designerwallcoverings.com/       # expect 401
+   ```
+
+Repeat step 1 for each changed file. Never `--delete`, never sync the whole tree,
+never sync `data/`.
+
+Deploy to this public, gated surface is **Steve-gated** — build + stage locally,
+then hand Steve the `/deploy` go. The same guardrail lives in the comment block at
+the top of `.deploy.conf`.

← 104aa8f Designtex dw_sku backfill on Kamatera dw_unified: backup + r  ·  back to All Designerwallcoverings  ·  auto-save: 2026-07-08T09:04:55 (1 files) — scripts/build-cov 005a048 →