summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-30 00:21:03 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-30 00:21:03 -0700
commit5fbc175e540803d919863f3d90dffc3c0645a90b (patch)
tree13713f582aa901311b2b2d05f289b351673f9827 /CLAUDE.md
parent66acc6f7d18c93f4b7960682bea5bd5ff1545802 (diff)
feat: add scripts/deploy.sh for idempotent production deploys
Handles first-time install (--install) and redeploys: pulls, builds backend and frontend as www-data with the required HOME/NPM_CONFIG_CACHE env, restarts systemd services, and smoke-checks /health and /. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md9
1 files changed, 1 insertions, 8 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 8ac44a0..5fc6417 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -41,14 +41,7 @@ Key files:
Topology: uvicorn on `127.0.0.1:8001`, `next start` on `127.0.0.1:3001`, nginx TLS reverse-proxy at `prism.tylerhoang.xyz` (`/api/` → backend, `/` → frontend). Service user `www-data`, code at `/var/www/prism-v2/`. Full deploy instructions in `README.md`.
-**Redeploy:**
-```bash
-cd /var/www/prism-v2 && sudo -u www-data git pull origin master
-sudo -u www-data backend/.venv/bin/pip install -r backend/requirements.txt
-sudo -u www-data env HOME=/var/www/prism-v2/frontend NPM_CONFIG_CACHE=/var/www/prism-v2/frontend/.npm npm --prefix frontend ci
-sudo -u www-data env HOME=/var/www/prism-v2/frontend NPM_CONFIG_CACHE=/var/www/prism-v2/frontend/.npm npm --prefix frontend run build
-sudo systemctl restart prismv2-backend.service prismv2-frontend.service
-```
+**Redeploy:** `sudo ./scripts/deploy.sh` from `/var/www/prism-v2` (idempotent — pull, install deps as `www-data`, build, restart, smoke-check). Flags: `--no-pull`, `--install` (refresh systemd units + nginx site).
**Logs / status:**
```bash