Files
AskaEth 46441335c0 refactor: 统一 .env 配置 — 合并 backend/.env + .docker.env 到根目录
- Go 服务 godotenv.Load("../.env") → godotenv.Load("../../.env")
- ethend.sh/config.js 读取路径改为根目录 .env
- 删除 .docker.env.example 和 backend/.env.example,统一为 .env.example
- Docker compose 默认读取根 .env,无需 --env-file
- 同步更新全部文档

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 10:12:54 +08:00

105 lines
2.9 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.
# ========== 服务配置 ==========
ENV=development
LOG_LEVEL=debug
# ========== 数据库 ==========
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=cyrene
POSTGRES_PASSWORD=cyrene_pass
POSTGRES_DB=cyrene_ai
# ========== Redis ==========
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# ========== LLM API ==========
LLM_API_URL=https://api.openai.com/v1
LLM_API_KEY=sk-xxxxx
LLM_MODEL=gpt-4o
LLM_FALLBACK_MODEL=gpt-4o-mini
# ========== DashScope STT (语音识别) ==========
DASHSCOPE_API_KEY=sk-xxxxx
DASHSCOPE_STT_MODEL=qwen3-asr-flash-2026-02-10
DASHSCOPE_STT_REALTIME_MODEL=qwen3-asr-flash-realtime
# ========== TTS/ASR (本地回退) ==========
TTS_PROVIDER=edge-tts
TTS_VOICE=zh-CN-XiaoxiaoNeural
ASR_PROVIDER=faster-whisper
ASR_MODEL=medium
# ========== 文件存储 ==========
MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=cyrene-assets
# ========== 管理员账户 (开发阶段使用) ==========
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your-admin-password
# ========== 管理员昵称 (昔涟对用户的基本称呼) ==========
ADMIN_NICKNAME=管理员
# ========== 注册开关 (开发环境建议开启) ==========
REGISTRATION_ENABLED=true
# ========== JWT ==========
JWT_SECRET=your-secret-key-change-in-production
JWT_EXPIRY_HOURS=720
# ========== 内部服务认证 ==========
INTERNAL_SERVICE_TOKEN=your-internal-token-change-in-production
# ========== IoT 调试服务 ==========
IOT_SERVICE_URL=http://localhost:8083
# ========== 后端微服务地址 ==========
MEMORY_SERVICE_URL=http://localhost:8091
TOOL_ENGINE_URL=http://localhost:8092
VOICE_SERVICE_URL=http://localhost:8093
# ========== 后台思考 ==========
ENABLE_BACKGROUND_THINKING=true
THINK_OFFLINE_GAP_SEC=600
# ========== Webhook (第三方平台接入) ==========
WEBHOOK_API_KEY=your-webhook-api-key
# ========== CORS 跨域白名单 (逗号分隔) ==========
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:5199,http://localhost:3000
# ========== 记忆系统 ==========
MEMORY_FILE_PATH=./data/memory
VECTOR_DB_URL=http://localhost:6333
VECTOR_DB_COLLECTION=cyrene_memories
# ========== 完整 OS 环境 (供 os_exec/os_file/os_system 工具) ==========
# 后端选择: direct (默认,仅沙箱), wsl (WSL2 完整Linux), docker (Docker容器)
HOST_EXEC_BACKEND=wsl
WSL_DISTRO=Ubuntu-22.04
# WSL 内自动创建的用户 (首次调用时自动创建,已存在则跳过)
WSL_USER=cyrene
WSL_USER_PASSWORD=cyrene
SANDBOX_CONTAINER=cyrene-sandbox
SANDBOX_IMAGE=ubuntu:22.04
HOST_EXEC_MAX_TIMEOUT=300
# ========== Docker 反向代理端口 ==========
CADDY_HTTP_PORT=80
CADDY_HTTPS_PORT=443
# ========== 域名与 HTTPSDocker 生产环境有域名时填写) ==========
DOMAIN=
ACME_EMAIL=admin@example.com
# ========== 管理控制台端口 (ethend) ==========
ETHEND_PORT=9090
# ========== WebSocket 最大连接数 ==========
WS_MAX_CONNECTIONS=1000
SESSION_IDLE_TIMEOUT_MIN=30