Files
CamTalk/backend/config/config.prod.yaml

72 lines
2.1 KiB
YAML
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.
# CamTalk 生产环境配置
# 通过 APP_ENV=prod 加载此文件,覆盖 config.yaml 中的配置
server:
host: "0.0.0.0"
port: 8080
read_timeout: 30
write_timeout: 30
shutdown_timeout: 15 # 生产环境优雅关闭时间稍长
heartbeat_interval: 30
heartbeat_timeout: 60
session:
ttl: 60 # 生产环境会话 1 小时
max_history: 20
ai:
stt:
provider: mimo # 生产环境推荐 MiMo性价比高
model: mimo-v2.5-asr
endpoint: "https://api.xiaomimimo.com/v1"
timeout: 5 # 生产环境严格超时控制
http_client_timeout: 30
llm:
provider: dashscope # 生产环境推荐通义千问,稳定性好
model: qwen3-vl-plus
endpoint: "https://dashscope.aliyuncs.com/compatible-mode/v1"
timeout: 30
http_client_timeout: 60
tts:
provider: mimo # 生产环境推荐 MiMo TTS
model: mimo-v2.5-tts
voice: mimo_default
speed: 1.0
endpoint: "https://token-plan-cn.xiaomimimo.com/v1"
timeout: 5
http_client_timeout: 30
output_format: mp3
sample_rate: 24000
storage:
redis:
enabled: true # 生产环境必须启用 Redis
persistence:
enabled: true # 生产环境必须启用持久化
driver: postgres
redis:
addr: "redis:6379" # Docker Compose 内部服务名
password: "" # 密码通过 CAMTALK_REDIS_PASSWORD 环境变量设置
db: 0
auth:
access_ttl: 120 # 生产环境 Access Token 2 小时
refresh_ttl: 10080 # Refresh Token 7 天
ratelimit:
enabled: true # 生产环境启用限流
query:
capacity: 10 # 允许突发 10 个请求
rate: 0.2 # 每 5 秒恢复 1 个令牌
login:
capacity: 5 # 防暴力破解
rate: 0.1 # 每 10 秒恢复 1 次
register:
capacity: 3 # 防批量注册
rate: 0.05 # 每 20 秒恢复 1 次
log:
level: info # 生产环境 info 级别
format: json # JSON 格式,便于日志收集和分析