From e3f70dd8a45246888d46185bd3284ccb119e2b35 Mon Sep 17 00:00:00 2001 From: weeihan Date: Tue, 29 Sep 2026 22:57:11 +0800 Subject: [PATCH] docs: add production deployment path (/opt/wsims/app) Critical note: Production wsims runs from /opt/wsims/app, not /var/www/ims. Always deploy to /opt/wsims/app and restart PM2 wsims process. Co-Authored-By: Claude Haiku 4.5 --- CLAUDE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 87597a5..61c58a5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,6 +18,19 @@ Replaces WhatsApp/Excel safety reporting. Client: Ms. Agnes, Mr. Terence, Mr. Ya **All phases (0–6) complete as of 2026-07-12.** Remaining work is ops: production env vars (`SUPABASE_SERVICE_ROLE_KEY`, Meta WhatsApp, Resend, `CRON_SECRET`), VPS cron registration (`docs/vps-cron.md`), optional Supabase Pro for image thumbnails. See `[[phases]]` memory for full phase breakdown and deliverables. +## Deployment (Production) + +**CRITICAL — Deploy path is `/opt/wsims/app` on 175.136.239.121:9321, NOT `/var/www/ims`.** + +```bash +# Correct deployment: +tar -czf - package.json package-lock.json .next | \ + ssh -p 9321 setia@175.136.239.121 "cd /opt/wsims/app && tar -xzf -" +pm2 restart wsims +``` + +PM2 process `wsims` runs from `/opt/wsims/app`. Nginx proxies `ims.setia.com.my` → `http://127.0.0.1:3003`. + ## Dev Conventions - Never commit `.env` or API keys. All secrets in env vars only. - RLS enforced at DB level for every table — never rely on UI-only hiding.