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 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
**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.
|
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
|
## Dev Conventions
|
||||||
- Never commit `.env` or API keys. All secrets in env vars only.
|
- 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.
|
- RLS enforced at DB level for every table — never rely on UI-only hiding.
|
||||||
|
|||||||
Reference in New Issue
Block a user