# Environment Configuration Template # 复制此文件为 .env.local (开发环境) 或 .env.production (生产环境) # ============================================ # Database Configuration # ============================================ # 开发环境: file:./data/dev.db # 生产环境: file:./data/prod.db DATABASE_URL=file:./data/dev.db # ============================================ # NextAuth Configuration # ============================================ # 开发环境: http://localhost:3000 # 生产环境: https://novalon.cn NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key-here # ============================================ # Admin User Configuration # ============================================ ADMIN_EMAIL=admin@novalon.cn ADMIN_PASSWORD=your-secure-password # ============================================ # Email Configuration (Resend) # ============================================ RESEND_API_KEY=your_resend_api_key_here COMPANY_EMAIL=contact@novalon.cn # ============================================ # Site Configuration # ============================================ # 开发环境: http://localhost:3000 # 生产环境: https://novalon.cn NEXT_PUBLIC_SITE_URL=http://localhost:3000 # ============================================ # Error Monitoring (Sentry) # ============================================ # 生产环境必需,开发环境可选 NEXT_PUBLIC_SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx # ============================================ # File Upload Configuration # ============================================ UPLOAD_DIR=./uploads MAX_FILE_SIZE=10485760 # ============================================ # Security Configuration # ============================================ # Rate Limiting (每分钟最大请求数) RATE_LIMIT_MAX_REQUESTS=10 RATE_LIMIT_WINDOW_MS=60000 # Captcha Configuration CAPTCHA_EXPIRY_MS=300000 CAPTCHA_MAX_ATTEMPTS=3 # Security Logging SECURITY_LOG_RETENTION_DAYS=30 SECURITY_LOG_MAX_ENTRIES=1000 # ============================================ # Development vs Production # ============================================ # # 开发环境设置: # - DATABASE_URL=file:./data/dev.db # - NEXTAUTH_URL=http://localhost:3000 # - NEXT_PUBLIC_SITE_URL=http://localhost:3000 # - NEXT_PUBLIC_SENTRY_DSN= (可选) # # 生产环境设置: # - DATABASE_URL=file:./data/prod.db # - NEXTAUTH_URL=https://novalon.cn # - NEXT_PUBLIC_SITE_URL=https://novalon.cn # - NEXT_PUBLIC_SENTRY_DSN= (必需) # - RESEND_API_KEY= (生产环境密钥) # - ADMIN_PASSWORD= (强密码)