Lock canonical npm deploy steps for production.
Prevent alternate package managers or ad-hoc deploy recipes in agent replies. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+24
-10
@@ -1,5 +1,26 @@
|
||||
# استقرار منتو CRM — `crm.montzar.ir`
|
||||
|
||||
> **قفلشده:** فقط همین فایل منبع دستورات استقرار است. پکیجمنیجر = **npm** (نه pnpm/yarn).
|
||||
> قانون Cursor: `.cursor/rules/deploy.mdc`
|
||||
|
||||
## آپدیت سریع (بعد از هر `git push`) — همیشه همین
|
||||
|
||||
```bash
|
||||
ssh -p 3031 montime@185.50.38.53
|
||||
cd /var/www/crm
|
||||
git pull
|
||||
|
||||
npm run build -w @mento/shared
|
||||
cd apps/api && npx prisma migrate deploy && npx prisma generate && cd ../..
|
||||
npm run build -w @mento/api
|
||||
npm run build -w @mento/web
|
||||
pm2 restart mento-crm-api
|
||||
# فقط اگر STT عوض شده:
|
||||
# pm2 restart mento-stt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
هاست مشترک مونتایم: `185.50.38.53` (SSH پورت `3031`، کاربر `montime`)
|
||||
دامنه: `https://crm.montzar.ir`
|
||||
مسیر کد: `/var/www/crm`
|
||||
@@ -170,23 +191,16 @@ sudo nginx -t && sudo systemctl reload nginx
|
||||
|
||||
## آپدیت بعدی (بعد از `git push`)
|
||||
|
||||
```bash
|
||||
ssh -p 3031 montime@185.50.38.53
|
||||
cd /var/www/crm
|
||||
git pull
|
||||
همان بلوک **«آپدیت سریع»** بالای فایل. نکات اضافه فقط در صورت نیاز:
|
||||
|
||||
```bash
|
||||
# اگر node_modules از tarball تازه شد، دوباره symlink:
|
||||
# rm -rf node_modules/@mento/shared && ln -s ../../packages/shared node_modules/@mento/shared
|
||||
# chmod +x node_modules/.bin/*
|
||||
|
||||
npm run build -w @mento/shared
|
||||
cd apps/api && npx prisma migrate deploy && npx prisma generate && cd ../..
|
||||
npm run build -w @mento/api
|
||||
npm run build -w @mento/web
|
||||
pm2 restart mento-crm-api
|
||||
# اگر requirements.txt عوض شد:
|
||||
# cd apps/stt && .venv/bin/pip install -r requirements.txt && cd ../..
|
||||
pm2 restart mento-stt
|
||||
# pm2 restart mento-stt
|
||||
```
|
||||
|
||||
پاک نکنید: `uploads/` و `apps/api/.env`
|
||||
|
||||
Reference in New Issue
Block a user