diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-30 00:21:03 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-30 00:21:03 -0700 |
| commit | 5fbc175e540803d919863f3d90dffc3c0645a90b (patch) | |
| tree | 13713f582aa901311b2b2d05f289b351673f9827 /AGENTS.md | |
| parent | 66acc6f7d18c93f4b7960682bea5bd5ff1545802 (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 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -29,14 +29,11 @@ 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 in one shot: +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 +cd /var/www/prism-v2 && sudo ./scripts/deploy.sh +# --no-pull to skip git pull; --install to also refresh systemd units + nginx site ``` ## Coding Style |
