.env.example 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # SaaS Platform Environment Configuration Template
  2. # Copy this file to .env and update the values
  3. # ============================================
  4. # DEPLOYMENT MODE
  5. # ============================================
  6. NODE_ENV=production
  7. # ============================================
  8. # PORT CONFIGURATION
  9. # ============================================
  10. # Nginx Gateway
  11. # For development, use 8888 to avoid conflicts with system services
  12. # For production, use 80/443
  13. HTTP_PORT=8888
  14. HTTPS_PORT=8443
  15. # Database
  16. POSTGRES_PORT=5432
  17. # Redis
  18. REDIS_PORT=6379
  19. # ============================================
  20. # DATABASE CONFIGURATION
  21. # ============================================
  22. POSTGRES_DB=saas_platform
  23. POSTGRES_USER=saas_user
  24. POSTGRES_PASSWORD=CHANGE_ME_RANDOM_PASSWORD_HERE
  25. # ============================================
  26. # REDIS CONFIGURATION
  27. # ============================================
  28. REDIS_PASSWORD=CHANGE_ME_RANDOM_PASSWORD_HERE
  29. # ============================================
  30. # JWT CONFIGURATION
  31. # ============================================
  32. JWT_SECRET=CHANGE_ME_RANDOM_SECRET_HERE
  33. JWT_EXPIRES_IN=15m
  34. REFRESH_TOKEN_EXPIRES_IN=7d
  35. # ============================================
  36. # DOMAIN CONFIGURATION
  37. # ============================================
  38. # Production domain (set by deploy.sh)
  39. DOMAIN=example.com
  40. CONSOLE_DOMAIN=console.example.com
  41. # ============================================
  42. # MINIO CONFIGURATION (S3-compatible storage)
  43. # ============================================
  44. MINIO_ROOT_USER=CHANGE_ME_RANDOM_ACCESS_KEY
  45. MINIO_ROOT_PASSWORD=CHANGE_ME_RANDOM_SECRET_KEY
  46. MINIO_ENDPOINT=minio
  47. MINIO_PORT=9000
  48. MINIO_USE_SSL=false
  49. # ============================================
  50. # SMTP CONFIGURATION (Email sending)
  51. # ============================================
  52. SMTP_HOST=smtp.example.com
  53. SMTP_PORT=587
  54. SMTP_SECURE=false
  55. SMTP_USER=noreply@example.com
  56. SMTP_PASSWORD=CHANGE_ME_SMTP_PASSWORD
  57. SMTP_FROM_EMAIL=noreply@example.com
  58. SMTP_FROM_NAME=SaaS Platform
  59. # ============================================
  60. # LET'S ENCRYPT CONFIGURATION
  61. # ============================================
  62. # Email for Let's Encrypt notifications (set by deploy.sh)
  63. LETSENCRYPT_EMAIL=admin@example.com
  64. # ============================================
  65. # MONITORING CONFIGURATION
  66. # ============================================
  67. GRAFANA_ADMIN_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
  68. PGADMIN_DEFAULT_EMAIL=admin@example.com
  69. PGADMIN_DEFAULT_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
  70. # ============================================
  71. # MCP SERVER CONFIGURATION
  72. # ============================================
  73. SAAS_API_URL=https://console.${DOMAIN:-example.com}
  74. SAAS_AUTH_URL=https://console.${DOMAIN:-example.com}/auth
  75. SAAS_STORAGE_URL=https://console.${DOMAIN:-example.com}/storage
  76. # ============================================
  77. # SECURITY NOTES
  78. # ============================================
  79. # 1. Generate random passwords using: openssl rand -base64 32
  80. # 2. Keep this file secure: chmod 600 .env
  81. # 3. Never commit .env to version control
  82. # 4. Backup this file in a secure location