Files
deerflow-code/offline-backend-20260512/.env
T
吉鑫升andClaude Opus 4.7 358d5c72a6 feat: 业务库切换 MySQL + 修复定时任务运行详情递归与重名 500
- 业务 ORM 数据支持 MySQL 后端(asyncmy),新增 PortableJSON/
  BeijingDateTime 可移植列类型、迁移脚本与切库脚本
- 修复 GET /api/scheduled-tasks/runs/{id} 的 _load_run 无限递归
  (误调用自身,应委托 service.get_run)导致的 RecursionError 500
- 定时任务名按用户唯一:create/update/admin_update 主动校验,
  冲突抛 DuplicateTaskNameError,路由转 409 而非裸 IntegrityError 500
- 补充回归测试 test_scheduled_task_run_lookup / _name_uniqueness

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 19:34:14 +08:00

62 lines
2.4 KiB
Bash

# ========================
# EDIT BEFORE DEPLOYMENT
# ========================
# This file is loaded by start_backend.scheduler.sh through docker --env-file.
# Put server-specific values here. Do not configure Python mirrors only on the
# host shell; values in this file are what the container will receive.
# AI provider keys. Replace placeholders and rotate any test key before release.
DEEPSEEK_API_KEY=sk-cea9133f82e24e9f939136746b05d5f8
OPENAI_API_KEY=your-openai-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
TAVILY_API_KEY=your-tavily-api-key
SERPER_API_KEY=your-serper-api-key
# Auth and frontend access.
# AUTH_JWT_SECRET must stay stable across restarts, or existing logins expire.
# GATEWAY_CORS_ORIGINS must include the exact frontend origins, separated by commas.
AUTH_JWT_SECRET=i3_BiBK44sYHiFIkChhDs46y57ZewJKO3diQDw01anI
GATEWAY_CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
GATEWAY_CORS_ALLOW_ALL=0
GATEWAY_ENABLE_DOCS=true
GATEWAY_WORKERS=2
DEER_FLOW_AUTH_DISABLED=false
AUTH_TRUSTED_PROXIES=
# Scheduler dependency behavior.
# Keep SCHEDULER_INSTALL_DEPS=1 if croniter is not already baked into the image.
# Set the Python mirror below if the server cannot access public PyPI.
SCHEDULER_INSTALL_DEPS=1
SCHEDULER_PIP_PACKAGES=croniter==6.2.2
SCHEDULED_TASKS_ENABLED=true
# Element / Matrix delivery for scheduled task results.
# If disabled or not configured, scheduled tasks still run but no Element DM is sent.
ELEMENT_ENABLED=false
ELEMENT_HOMESERVER_URL=
ELEMENT_ACCESS_TOKEN=
ELEMENT_BOT_USERNAME=scheduled-bot
ELEMENT_BOT_PASSWORD=
ELEMENT_AUTO_REGISTER=false
ELEMENT_STATE_FILE=/app/backend/.deer-flow/element-bot-token
# Python private package index used by uv/pip inside the backend container and
# propagated into sandbox containers for agent-installed dependencies.
# Uncomment and set these to your internal mirror when public PyPI is blocked.
# UV_INDEX_URL=http://your-python-mirror/simple
# PIP_INDEX_URL=http://your-python-mirror/simple
# UV_TRUSTED_HOST=your-python-mirror
# PIP_TRUSTED_HOST=your-python-mirror
# PIP_EXTRA_INDEX_URL=
# UV_EXTRA_INDEX_URL=
# HTTP_PROXY=
# HTTPS_PROXY=
# NO_PROXY=
# Alternative generic names also supported by the startup script.
# PYTHON_PACKAGE_INDEX_URL=http://your-python-mirror/simple
# PYTHON_EXTRA_INDEX_URL=
# PYTHON_TRUSTED_HOST=your-python-mirror
MYSQL_DATABASE_URL=mysql+asyncmy://kland:kland%4088124932@192.168.0.123:3306/deerflow?charset=utf8mb4