Files
ai-video-fullstack/backend/.env.example
2026-08-05 14:05:22 +08:00

31 lines
1.3 KiB
Plaintext

# 复制为 .env 并填入真实值。
# 模型接入配置不再放在 .env;请在 model_resources 中维护 apiUrl/modelId/apiKey 等字段。
# 开发环境可先执行 `make db-seed`,再到前端「组件 / 模型」里替换真实密钥。
# ---- 数据库(Postgres) ----
# 本地直连;docker compose 里则用 postgres:5432
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/postgres
# ---- 服务监听 & 跨域 ----
HOST=0.0.0.0
PORT=8000
# 前端开发地址,允许跨域(公网部署时加上实际前端 origin)
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
# ---- RustFS / S3-compatible storage ----
S3_ENDPOINT_URL=http://localhost:9000
S3_ACCESS_KEY=rustfsadmin
S3_SECRET_KEY=rustfsadmin
S3_BUCKET=ai-video
S3_REGION=us-east-1
KNOWLEDGE_MAX_FILE_BYTES=20971520
KNOWLEDGE_TOP_K=5
# ---- WebRTC TURN(公网跨网语音预览;本地开发留空) ----
# 与 docker compose --profile remote 的 coturn 配套。云安全组需放行 UDP 3478 与 49152-49200。
# Docker Compose 部署请在项目根 .env 设置这些变量;此处适用于宿主机直接运行 uvicorn。
# STUN_URL=stun:118.89.89.89:3478
# TURN_URLS=turn:118.89.89.89:3478?transport=udp,turn:118.89.89.89:3478?transport=tcp
# TURN_SECRET=your-turn-secret
# TURN_CREDENTIAL_TTL=86400