90 lines
3.9 KiB
Plaintext
90 lines
3.9 KiB
Plaintext
# 🚀 Customer Portal - Production Environment
|
|
# Copy this file to .env for production deployment
|
|
# This configuration is optimized for production with security and performance
|
|
|
|
# =============================================================================
|
|
# 🗄️ DATABASE CONFIGURATION (Production)
|
|
# =============================================================================
|
|
# Using Docker internal networking (container names as hostnames)
|
|
DATABASE_URL="postgresql://portal:YOUR_SECURE_DB_PASSWORD@database:5432/portal_prod?schema=public"
|
|
|
|
# =============================================================================
|
|
# 🔴 REDIS CONFIGURATION (Production)
|
|
# =============================================================================
|
|
# Using Docker internal networking
|
|
REDIS_URL="redis://cache:6379"
|
|
|
|
# =============================================================================
|
|
# 🌐 APPLICATION CONFIGURATION (Production)
|
|
# =============================================================================
|
|
# Backend Configuration
|
|
APP_NAME="customer-portal-bff"
|
|
PORT=4000
|
|
NODE_ENV="production"
|
|
|
|
# Frontend Configuration (NEXT_PUBLIC_ variables are exposed to browser)
|
|
NEXT_PUBLIC_APP_NAME="Customer Portal"
|
|
NEXT_PUBLIC_APP_VERSION="1.0.0"
|
|
NEXT_PUBLIC_API_BASE="https://yourdomain.com"
|
|
NEXT_PUBLIC_ENABLE_DEVTOOLS="false"
|
|
|
|
# =============================================================================
|
|
# 🔐 SECURITY CONFIGURATION (Production)
|
|
# =============================================================================
|
|
# JWT Secret (CRITICAL: Use a strong, unique secret!)
|
|
# Generate with: openssl rand -base64 32
|
|
JWT_SECRET="GENERATE_SECURE_JWT_SECRET_HERE"
|
|
JWT_EXPIRES_IN="7d"
|
|
|
|
# Password Hashing (High rounds for security)
|
|
BCRYPT_ROUNDS=12
|
|
|
|
# CORS (Your production domain)
|
|
CORS_ORIGIN="https://yourdomain.com"
|
|
|
|
# =============================================================================
|
|
# 🏢 EXTERNAL API CONFIGURATION (Production)
|
|
# =============================================================================
|
|
# WHMCS Integration (Production Environment)
|
|
WHMCS_BASE_URL="https://your-whmcs-domain.com"
|
|
WHMCS_API_IDENTIFIER="your_production_identifier"
|
|
WHMCS_API_SECRET="your_production_secret"
|
|
|
|
# Salesforce Integration (Production Environment)
|
|
SF_LOGIN_URL="https://login.salesforce.com"
|
|
SF_CLIENT_ID="your_production_client_id"
|
|
SF_PRIVATE_KEY_PATH="/app/secrets/sf-prod.key"
|
|
SF_USERNAME="production@yourcompany.com"
|
|
|
|
# =============================================================================
|
|
# 📊 LOGGING CONFIGURATION (Production)
|
|
# =============================================================================
|
|
LOG_LEVEL="info"
|
|
|
|
# =============================================================================
|
|
# 🎛️ PRODUCTION CONFIGURATION
|
|
# =============================================================================
|
|
# Node.js options for production
|
|
NODE_OPTIONS="--max-old-space-size=2048"
|
|
|
|
# =============================================================================
|
|
# 🔒 SECURITY CHECKLIST FOR PRODUCTION
|
|
# =============================================================================
|
|
# ✅ Replace ALL default/demo values with real credentials
|
|
# ✅ Use strong, unique passwords and secrets
|
|
# ✅ Ensure SF_PRIVATE_KEY_PATH points to actual key file
|
|
# ✅ Set correct CORS_ORIGIN for your domain
|
|
# ✅ Use HTTPS URLs for all external services
|
|
# ✅ Verify DATABASE_URL password matches docker-compose.yml
|
|
# ✅ Test all integrations before going live
|
|
|
|
# =============================================================================
|
|
# 🐳 DOCKER PRODUCTION NOTES
|
|
# =============================================================================
|
|
# For Docker production deployment:
|
|
# 1. Place this file as .env in project root
|
|
# 2. Run: pnpm prod:deploy
|
|
# 3. All services run in containers with optimized configurations
|
|
# 4. Database persists in docker volume: portal_postgres_data
|
|
# 5. Redis persists in docker volume: portal_redis_data
|