Files
2026-06-08 13:30:02 +08:00

83 lines
2.6 KiB
Bash
Raw Permalink 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.
# 美家卡智影 API - 环境变量配置示例
# ================================
# 复制此文件为 .env 并填写实际值
# === 基础配置 ===
APP_NAME=美家卡智影 API
APP_VERSION=1.8.2
# ⚠️ 生产环境必须设为 false
DEBUG=true
ENV=development
HOST=0.0.0.0
PORT=8000
# === 服务器地址 ===
# 不配置时自动根据 ENV 推断:production→tapi.meijiaka.cn, staging→dev.tapi.meijiaka.cn
# APP_BASE_URL=https://dev.tapi.meijiaka.cn
# === 数据库配置 ===
# 本地开发: localhost
# Docker 部署: 容器名(如 db、meijiaka-db
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/meijiaka_zy
# === Redis 配置 ===
# 本地开发: localhost
# Docker 部署: 容器名(如 redis、meijiaka-redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
# REDIS_PASSWORD= # 如无密码请留空或注释
# === JWT 安全配置 ===
# 生产环境必须修改为强随机密钥(至少 32 位)
SECRET_KEY=dev-secret-key-change-me
ALGORITHM=HS256
# === CORS 配置 ===
# 本地开发: 允许 localhost
# 测试/生产服: 填写实际域名,如 https://app.yourdomain.com
CORS_ORIGINS=http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080,tauri://localhost,http://tauri.localhost,https://tauri.localhost
# === AI 平台配置 ===
# 火山方舟
VOLCENGINE_API_KEY=your-volcengine-api-key
# 火山字幕服务
VOLCENGINE_CAPTION_APPID=your-caption-appid
VOLCENGINE_CAPTION_TOKEN=your-caption-token
# 火山 MediaKit
VOLCENGINE_MEDIAKIT_TOKEN=your-mediakit-token
# Vidu(TTS、声音复刻、对口型)
VIDU_API_KEY=your-vidu-api-key
# === 七牛云存储(空镜图片上传)===
QINIU_ACCESS_KEY=your-qiniu-access-key
QINIU_SECRET_KEY=your-qiniu-secret-key
QINIU_VIDEO_BUCKET=media-liche
QINIU_VIDEO_DOMAIN=media.liche.cn
QINIU_IMAGE_BUCKET=img-liche
QINIU_IMAGE_DOMAIN=img.liche.cn
# === 微信支付(APIv2===
# ⚠️ P0 必填 — 充值功能依赖以下 4 项,未配置则微信支付完全不可用
WXPAY_MCHID=your-mchid
WXPAY_APPID=your-wx-appid
WXPAY_API_KEY=your-api-key
WXPAY_NOTIFY_URL=https://your-domain.com/api/v1/points/recharge/notify
# === B2M 短信平台 ===
# ⚠️ P0 必填 — 未配置时 SMS 降级为仅打印日志(开发可用,测试/生产不可用)
SMS_APP_ID=your-sms-app-id
SMS_SECRET_KEY=your-16-24-32-byte-aes-key
SMS_BASE_URL=https://bjksmtn.b2m.cn/inter/sendSingleSMS
# SMS_EXTENDED_CODE= # 扩展码(选填)
# 免验证码登录白名单(逗号分隔),名单内的手机号登录时跳过验证码校验
# SMS_CODE_WHITELIST=13800138000,13900139000
# === 日志配置 ===
# 生产环境建议 INFO
LOG_LEVEL=ERROR