topfans/docker/.env.local.dev
Lenticular Studio Agent af7908e72e feat: 接入微达API中转站,重构镭射卡生图流程
- 替换中转站从 xbcl.link 到 weda.cc
- prompt 模板改为镭射卡全图生成(去掉 6 层合成/抠图依赖)
- 4 路并发调用 + 原图展示 = 5 张 variant
- 前端提示词中译英支持
- 全局 Vue errorHandler
- WebSocket 鉴权失败跳登录
- 删除已弃用的 laserCompositor 微服务

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-23 22:43:49 +08:00

53 lines
2.9 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.

# ===================================================================
# TopFans Docker - 本机开发环境真实凭据untracked不进 git
# 由 docker-compose --env-file .env.local --env-file .env.local.dev 叠加读入
# ===================================================================
# 宿主机手起的 topfans-postgres
DB_USER=haihuizhu
DB_PASSWORD=admin
DB_NAME=top-fans
DB_PORT=5432
DB_HOST=host.docker.internal
# 宿主机手起的 topfans-redis重建后通过容器名 topfans-redis:6379 直连)
REDIS_HOST=topfans-redis
REDIS_PORT=6379
REDIS_PASSWORD=123456
# ==================== 镭射卡 OpenAI 中转站路径(覆盖 .env.local 的默认值)====================
# 前端 VITE_API_BASE_URL=http://localhost:18090 → 打到 docker gateway (18090)
# 所以 LASER_GEN_PROVIDER 必须在这里改,docker-compose.override.yml 第 92 行
# LASER_GEN_PROVIDER: ${LASER_GEN_PROVIDER:-minimax}
# 会把这里注入到容器,覆盖 .env.local 的 minimax 默认值
LASER_GEN_PROVIDER=openai
# 中转站 BaseURL —— XBCL 必须含 /v1 后缀(代码会拼成 https://xbcl.link/v1/images/edits)
# 直连 OpenAI 官方会被墙,这里走 XBCL 中转
# XBCL 的 chat / image / 其他端点都挂在 /v1/... 下,这是 OpenAI 兼容中转的标准路径
OPENAI_BASE_URL=https://xbcl.link/v1
# 中转站 model:XBCL /v1/models 实际暴露的 image 类模型是 gpt-image-1 / 1.5 / 2
# openai_client.go 的 buildEditFields() 根据 model 名前缀自动选参数集
# - gpt-image-* → 完整参数(transparent + 1024x1536 竖版)
# - 其他 → 基础参数(1024x1024 square,无 transparent,保守路径)
OPENAI_MODEL=gpt-image-2
# ⚠️ 中转站 API key —— ⚠️ 务必先在 https://xbcl.link 撤销旧 key 再填新的
# 因为之前 OpenAI 官方 key 已在对话历史里泄漏过,直接换中转站独立 key
# 撤销旧 key → 生成新 key → 把值贴到下面这一行
OPENAI_API_KEY=sk-b1f01c1ebc177e8fbd8e19ca3edeb542b521c39039977ef2974ce06c5d4cc18d
# ==================== Dify 配置保留(暂未切回 dify,留着方便回滚)====================
# gateway 容器的 DIFY_API_BASE 默认是 https://api.dify.ai/v1生产 SaaS
# 本机要走自起的 Difyproject=difynginx 暴露在 host:80 → /v1 路由到 api:5001
#
# ⚠️ 不能用 host.docker.internalDocker Desktop 的 com.docker.backend.exe
# 抢占了 host 的 0.0.0.0:80host.docker.internal (192.168.65.254) 走不通。
# 用 host 真实 IP 172.23.0.1 直连 host:80Dify nginx bind 在这)
DIFY_API_BASE=http://172.23.0.1/v1
# 从 Dify 数据库里 laser_card_variants_v1 这个 app 的 api_tokens 表里取出来的
DIFY_API_KEY=app-Ibs7reARanyuYGZ7zrLyiM6e
# ==================== JWT_SECRET ====================
# 本机用生产同款 secret让生产签发的 token 在本机 gateway 也能验签通过
# ⚠️ 本地开发用,绝对不要把生产 secret 提交到 git
JWT_SECRET=topfans-secret-key-please-change-in-production