From c0724a62c5e5742469339ec7aef4d0f509e10559 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sat, 30 May 2026 00:26:08 -0700 Subject: fix: align deploy flow with post-receive checkout (no .git in /var/www) The working tree at /var/www/prism-v2 is populated by a post-receive hook that does `git --work-tree=... checkout -f`, so it has no .git directory. Drop git operations from deploy.sh and add scripts/post-receive.sample plus README setup for the bare repo + hook + sudoers wiring. Co-Authored-By: Claude Opus 4.7 --- AGENTS.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index fbb2f2a..98e355e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,12 +29,7 @@ cd frontend && npm run lint && npm run build Topology: uvicorn on `127.0.0.1:8001`, `next start` on `127.0.0.1:3001`, nginx TLS reverse-proxy (`/api/` → backend, `/` → frontend). See `README.md` for the full deploy and redeploy commands. Service user is `www-data`; code lives at `/var/www/prism-v2/`. -Redeploy: - -```bash -cd /var/www/prism-v2 && sudo ./scripts/deploy.sh -# --no-pull to skip git pull; --install to also refresh systemd units + nginx site -``` +Deploy flow: bare repo at `/srv/git/prism-v2.git`; pushing master triggers a post-receive hook that `git checkout -f`s the tree into `/var/www/prism-v2/` and runs `scripts/deploy.sh` (build + restart + smoke check). `/var/www/prism-v2/` has no `.git/`. Manual deploy on the server: `sudo ./scripts/deploy.sh` (add `--install` to refresh systemd units / nginx site). See README for first-time setup. ## Coding Style -- cgit v1.3-2-g0d8e