Files
life-echo/api/.env.production
iammm0 0925c6f15a refactor: 优化短信验证服务
- 优化sms_service.py短信验证服务实现
- 更新.env.production配置
2026-01-27 14:30:12 +08:00

49 lines
2.3 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=1401010099
# 短信签名内容(不包含【】符号)
TENCENT_SMS_SIGN_NAME=上海华嘎科技有限公司
# 短信模板 ID
TENCENT_SMS_TEMPLATE_ID=2592163
# 短信模板参数数量1=仅验证码2=验证码+过期时间)
# 如果遇到 TemplateParamSetNotMatchApprovedTemplate 错误,请检查腾讯云控制台中的模板配置
# 并根据实际模板参数数量设置此值
TENCENT_SMS_TEMPLATE_PARAM_COUNT=1