Files
crm/deploy/.env.production.example
T
MahdiandCursor 3b50f14817 Document production deploy gotchas for SMS, Postgres, and shared symlink.
Capture real server lessons so future updates avoid DATABASE_URL, tarball, and nginx traps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 10:00:21 +03:30

28 lines
862 B
Bash

# Production — copy to /var/www/crm/apps/api/.env on the server
# Do not commit real secrets.
NODE_ENV=production
PORT=3030
CORS_ORIGIN=https://crm.montzar.ir
JWT_SECRET=change-me-long-random-production-secret
JWT_EXPIRES_IN=7d
# Postgres روی همین سرور — پورت واقعی این هاست معمولاً 15432 است (نه 5432)
DATABASE_URL="postgresql://mento:CHANGE_ME@127.0.0.1:15432/mento_crm?schema=public"
UPLOAD_DIR=/var/www/crm/uploads
# در production کد OTP را در JSON برنگردانید
PORTAL_SHOW_OTP=false
AUTH_RETURN_OTP=false
# SMS — پنل ترِز / رایگان (همان الگوی montime)
SMS_PROVIDER=trez
SMS_USERNAME=
SMS_PASSWORD=
SMS_SENDER=
SMS_BASE_URL=http://smspanel.Trez.ir
SMS_SEND_PATH=/SendMessageWithCode.ashx
SMS_OTP_TEMPLATE=کد ورود پرتال منتو: {code}
# SMS_TIMEOUT_MS=20000