3f3821581c
- Add USE_IN_MEMORY_DB config flag - Auto-select repository implementation based on config - InMemory: for development and testing (no setup needed) - PostgreSQL: for production (persistent data) - Update DependencyContainer to support both - Add documentation for switching databases - Update .env.example with new config Phase 4 Task 36/68 completed
39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
# 小虾 SaaS 环境变量配置
|
|
|
|
# ==================== 应用配置 ====================
|
|
APP_NAME=小虾 SaaS
|
|
BASE_URL=http://localhost:3000
|
|
|
|
# ==================== 数据库配置 ====================
|
|
DATABASE_URL=postgresql://xiaoxia_user:your_password@localhost:5432/xiaoxia_saas
|
|
|
|
# 开发环境:使用内存数据库(不需要 PostgreSQL)
|
|
USE_IN_MEMORY_DB=true
|
|
|
|
# 生产环境:使用 PostgreSQL
|
|
# USE_IN_MEMORY_DB=false
|
|
|
|
# ==================== Redis 配置 ====================
|
|
REDIS_URL=redis://localhost:6379/0
|
|
|
|
# ==================== JWT 配置 ====================
|
|
JWT_SECRET_KEY=your-super-secret-key-change-this-in-production-min-32-chars
|
|
JWT_ALGORITHM=HS256
|
|
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
JWT_REFRESH_TOKEN_EXPIRE_DAYS=30
|
|
|
|
# ==================== 邮件配置 ====================
|
|
SMTP_HOST=smtp.gmail.com
|
|
SMTP_PORT=587
|
|
SMTP_USER=your-email@gmail.com
|
|
SMTP_PASSWORD=your-app-specific-password
|
|
SMTP_FROM_EMAIL=noreply@xiaoxia-saas.com
|
|
SMTP_FROM_NAME=小虾 SaaS
|
|
|
|
# ==================== 环境配置 ====================
|
|
ENVIRONMENT=development
|
|
DEBUG=true
|
|
|
|
# ==================== CORS 配置 ====================
|
|
CORS_ORIGINS=["http://localhost:3000","http://localhost:5173"]
|