Files
life-echo/api/.env.production
iammm0 9c39df62bc feat: 新增短信验证码服务
- 新增sms_service.py短信验证服务
- 新增test_sms_verification.py短信验证测试
- 更新requirements.txt添加短信服务依赖
- 更新.env.production添加短信服务配置
2026-01-27 11:35:54 +08:00

45 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DeepSeek API 配置(推荐,优先使用)
DEEPSEEK_API_KEY=sk-09f17fb61c5a4299a3afc2a01de7af75
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-chat
# =============================================================================
# 数据库配置(必需)
# =============================================================================
# PostgreSQL 数据库连接 URL
# 格式: postgresql://用户名:密码@主机:端口/数据库名
DATABASE_URL=postgresql://postgres:postgres@postgresql:5432/life_echo
# =============================================================================
# Redis 配置(必需)
# =============================================================================
# Redis 连接 URL
# 格式: redis://[:密码@]主机:端口[/数据库编号]
REDIS_URL=redis://redis:6379/0
# Redis 会话过期时间(可选,默认: 86400 秒,即 24 小时)
REDIS_SESSION_TTL=86400
# =============================================================================
# 认证配置(必需)
# =============================================================================
# JWT 签名密钥(必需)
# 建议使用随机生成的强密钥,例如: openssl rand -hex 32
# 生产环境必须更换为强随机字符串
SECRET_KEY=cf47555c7ecbe5ddb7fd2113c59e08a8bcb110810c42f7c644e06a5acc898608
# JWT 算法(可选,默认: HS256
ALGORITHM=HS256
# 访问令牌过期时间(可选,默认: 120 分钟,即 2 小时)
ACCESS_TOKEN_EXPIRE_MINUTES=120
# =============================================================================
# 腾讯云短信服务配置(必需)
# =============================================================================
# 腾讯云 SecretId 和 SecretKey
TENCENT_SMS_SECRET_ID=AKIDmXEoYQCypUyFI9nH7tWzGOJG7e3ING0Y
TENCENT_SMS_SECRET_KEY=Vq22tb7UghhV6WnskRyQjroY5QDqHUXO
# 短信应用 SDK AppID
TENCENT_SMS_SDK_APP_ID=1319381411
# 短信签名内容(不包含【】符号)
TENCENT_SMS_SIGN_NAME=上海华嘎科技有限公司
# 短信模板 ID
TENCENT_SMS_TEMPLATE_ID=2592163