← back to Commercialrealestate
add on-demand CRCP front-end deploy script (mac3->Kamatera)
a8e4386e4582365eb9d2a7c12a1e4799df73b00e · 2026-07-16 17:34:43 -0700 · Steve
Root-cause tooling for the 9-day stale-deploy: crcp.agentabrams.com is a
Kamatera-local rsync copy with no code-sync. This gives it a reviewable,
backup-first, html/js/css-only, no---delete, NOT-scheduled deploy path.
Scheduling it is intentionally left out (a cron would push uncommitted local
edits to prod).
Files touched
A deploy/push-frontend-kamatera.sh
Diff
commit a8e4386e4582365eb9d2a7c12a1e4799df73b00e
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jul 16 17:34:43 2026 -0700
add on-demand CRCP front-end deploy script (mac3->Kamatera)
Root-cause tooling for the 9-day stale-deploy: crcp.agentabrams.com is a
Kamatera-local rsync copy with no code-sync. This gives it a reviewable,
backup-first, html/js/css-only, no---delete, NOT-scheduled deploy path.
Scheduling it is intentionally left out (a cron would push uncommitted local
edits to prod).
---
deploy/push-frontend-kamatera.sh | 48 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/deploy/push-frontend-kamatera.sh b/deploy/push-frontend-kamatera.sh
new file mode 100755
index 0000000..95d5ad0
--- /dev/null
+++ b/deploy/push-frontend-kamatera.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+# push-frontend-kamatera.sh — on-demand front-end deploy mac3 -> Kamatera CRCP prod.
+#
+# WHY THIS EXISTS: crcp.agentabrams.com is a Kamatera-LOCAL node app
+# (/root/public-projects/commercialrealestate, 127.0.0.1:9911 behind nginx).
+# There is NO auto code-sync, so the live front-end silently drifts stale
+# (it was frozen 9 days — Jul 7 -> Jul 16 2026 — until an iPad-fix hotfix).
+# This script is the MANUAL, reviewable way to push front-end changes to prod.
+#
+# SCOPE: static front-end ONLY (public/*.html, *.js, *.css). It does NOT touch
+# data/ (Kamatera has its own snapshots) or scripts/serve.js (server logic) or
+# .env — those are deliberately excluded to keep the blast radius small.
+# serve.js uses express.static, so pushed files go live on next request (no restart).
+#
+# It is intentionally NOT scheduled: a cron would push uncommitted/half-baked
+# local edits to prod unattended. Run it on purpose, after committing.
+#
+# Usage: bash deploy/push-frontend-kamatera.sh [--dry-run]
+set -euo pipefail
+
+HOST="root@45.61.58.125"
+REMOTE="/root/public-projects/commercialrealestate/public"
+LOCAL="$(cd "$(dirname "$0")/.." && pwd)/public"
+STAMP="$(date +%Y%m%d-%H%M%S)"
+
+DRY=""
+[ "${1:-}" = "--dry-run" ] && DRY="--dry-run"
+
+echo "== CRCP front-end deploy -> $HOST:$REMOTE =="
+echo " local: $LOCAL"
+[ -n "$DRY" ] && echo " (DRY RUN — no files written)"
+
+# 1) timestamped backup of the current remote public/ (rollback point)
+if [ -z "$DRY" ]; then
+ ssh -o ConnectTimeout=10 "$HOST" \
+ "cp -a '$REMOTE' '${REMOTE}.bak-$STAMP' && echo ' backup: ${REMOTE}.bak-$STAMP'"
+fi
+
+# 2) rsync front-end assets only (html/js/css), delete-protected (no --delete;
+# never removes remote files this script didn't place)
+rsync -avz $DRY \
+ --include='*/' \
+ --include='*.html' --include='*.js' --include='*.css' \
+ --exclude='*' \
+ -e 'ssh -o ConnectTimeout=10' \
+ "$LOCAL/" "$HOST:$REMOTE/"
+
+echo "== done. verify: curl -sI -u admin:*** https://crcp.agentabrams.com/index.html | grep last-modified =="
← 0f635d9 iPad fix sweep: crcp.html nav breakpoint 760->1024, licensed
·
back to Commercialrealestate
·
add CRCP origin-vs-live drift canary (DTD verdict D) b4b3c10 →