125 lines
4.1 KiB
Plaintext
125 lines
4.1 KiB
Plaintext
|
|
# AI Pet Companion Platform - Unified Environment Variables
|
|||
|
|
# Copy this file to .env and fill in your actual values
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# 统一配置 - 所有环境通用
|
|||
|
|
# =============================================================================
|
|||
|
|
|
|||
|
|
# Application Settings
|
|||
|
|
APP_NAME=AI Pet Companion API
|
|||
|
|
DEBUG=false
|
|||
|
|
HOST=0.0.0.0
|
|||
|
|
PORT=8001
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# 后端服务配置
|
|||
|
|
# =============================================================================
|
|||
|
|
|
|||
|
|
# Database Settings
|
|||
|
|
DATABASE_URL=mysql+pymysql://root:password@localhost:3306/pet_companion
|
|||
|
|
|
|||
|
|
# JWT Settings
|
|||
|
|
JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-production
|
|||
|
|
JWT_ALGORITHM=HS256
|
|||
|
|
ACCESS_TOKEN_EXPIRE_MINUTES=120
|
|||
|
|
REFRESH_TOKEN_EXPIRE_DAYS=7
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# CORS配置 - 统一管理所有允许的域名
|
|||
|
|
# =============================================================================
|
|||
|
|
# 支持的域名格式:
|
|||
|
|
# - localhost:3000 (本地开发)
|
|||
|
|
# - 127.0.0.1:3000 (本地开发)
|
|||
|
|
# - localhost:3001 (本地开发备用端口)
|
|||
|
|
# - 8.152.169.84:3000 (测试服务器IP)
|
|||
|
|
# - www.wentuu.com (生产域名)
|
|||
|
|
# - api.wentuu.com (生产API域名)
|
|||
|
|
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8080,http://localhost:3001,http://127.0.0.1:3001,http://8.152.169.84:3000,https://www.wentuu.com,https://api.wentuu.com
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# 前端服务配置 - 供前端读取
|
|||
|
|
# =============================================================================
|
|||
|
|
# 前端开发服务器端口
|
|||
|
|
FRONTEND_PORT=3000
|
|||
|
|
|
|||
|
|
# API服务地址 - 开发环境使用 localhost,生产环境使用域名
|
|||
|
|
# 开发环境: http://localhost:8001
|
|||
|
|
# 生产环境: https://api.wentuu.com
|
|||
|
|
API_BASE_URL=http://localhost:8001
|
|||
|
|
API_BASE_URL_PROD=https://api.wentuu.com
|
|||
|
|
|
|||
|
|
# WebSocket地址
|
|||
|
|
WS_URL=ws://localhost:8001
|
|||
|
|
WS_URL_PROD=wss://api.wentuu.com
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# 第三方服务配置
|
|||
|
|
# =============================================================================
|
|||
|
|
|
|||
|
|
# 微信认证
|
|||
|
|
WECHAT_APP_ID=
|
|||
|
|
WECHAT_APP_SECRET=
|
|||
|
|
|
|||
|
|
TENCENT_CLOUD_SECRET_ID=
|
|||
|
|
TENCENT_CLOUD_SECRET_KEY=
|
|||
|
|
TENCENT_CLOUD_REGION=ap-beijing
|
|||
|
|
|
|||
|
|
# 火山引擎语音服务配置
|
|||
|
|
VOLCANO_APP_ID=your-app-id-here
|
|||
|
|
VOLCANO_ACCESS_TOKEN=your-access-token-here
|
|||
|
|
VOLCANO_SECRET_KEY=your-secret-key-here
|
|||
|
|
VOLCANO_BIDIRECTIONAL_ENABLED=false
|
|||
|
|
VOLCANO_TTS_CLUSTER=volcano_bigtts
|
|||
|
|
VOLCANO_ASR_CLUSTER=volcano_bigtts
|
|||
|
|
VOLCANO_TTS_VOICE=zh_female_vv_jupiter_bigtts
|
|||
|
|
VOLCANO_TTS_RESOURCE_ID=seed-tts-2.0
|
|||
|
|
VOLCANO_ASR_RESOURCE_ID=volc.bigasr.sauc.duration
|
|||
|
|
|
|||
|
|
# 字节跳动 ARK API (Doubao模型)
|
|||
|
|
ARK_API_KEY=your-ark-api-key-here
|
|||
|
|
ARK_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
|
|||
|
|
DOUBAO_API_KEY=
|
|||
|
|
DOUBAO_SECRET_KEY=
|
|||
|
|
DOUBAO_APP_ID=
|
|||
|
|
DOUBAO_MODEL_NAME=doubao-seed-1-6-lite-251015
|
|||
|
|
DOUBAO_REALTIME_URL=wss://ark.cn-beijing.volces.com/api/v3/realtime
|
|||
|
|
|
|||
|
|
# 火山引擎端到端实时语音
|
|||
|
|
REALTIME_VOICE_APP_ID=your-app-id-here
|
|||
|
|
REALTIME_VOICE_ACCESS_KEY=your-access-key-here
|
|||
|
|
REALTIME_VOICE_API_URL=wss://openspeech.bytedance.com/api/v3/realtime/dialogue
|
|||
|
|
REALTIME_VOICE_RESOURCE_ID=volc.speech.dialog
|
|||
|
|
|
|||
|
|
# 阿里云短信服务配置
|
|||
|
|
# 申请地址: https://dypns.console.aliyun.com/
|
|||
|
|
# 注意:必须使用系统赠送的签名和模板
|
|||
|
|
ALIYUN_SMS_ENABLED=false
|
|||
|
|
ALIYUN_SMS_ACCESS_KEY_ID=your-access-key-id
|
|||
|
|
ALIYUN_SMS_ACCESS_KEY_SECRET=your-access-key-secret
|
|||
|
|
ALIYUN_SMS_REGION_ID=cn-hangzhou
|
|||
|
|
ALIYUN_SMS_SIGN_NAME=your-sign-name
|
|||
|
|
ALIYUN_SMS_TEMPLATE_CODE=your-template-code
|
|||
|
|
|
|||
|
|
# 短信验证码配置
|
|||
|
|
SMS_CODE_LENGTH=6
|
|||
|
|
SMS_CODE_VALID_SECONDS=300
|
|||
|
|
SMS_SEND_INTERVAL_SECONDS=60
|
|||
|
|
|
|||
|
|
# =============================================================================
|
|||
|
|
# 存储和缓存配置
|
|||
|
|
# =============================================================================
|
|||
|
|
|
|||
|
|
# Storage Settings
|
|||
|
|
UPLOAD_FOLDER=./uploads
|
|||
|
|
MAX_CONTENT_LENGTH=16777216
|
|||
|
|
|
|||
|
|
# Redis Settings
|
|||
|
|
REDIS_URL=redis://localhost:6379/0
|
|||
|
|
REDIS_PASSWORD=
|
|||
|
|
|
|||
|
|
# Logging Settings
|
|||
|
|
LOG_LEVEL=INFO
|
|||
|
|
|
|||
|
|
# Default Values
|
|||
|
|
DEFAULT_BACKGROUND_ID=1
|
|||
|
|
DEFAULT_DAILY_QUOTA=20
|