Repository navigation
Expand file tree
/
Copy pathenv.example
More file actions
118 lines (89 loc) · 3.27 KB
/
Copy pathenv.example
File metadata and controls
118 lines (89 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# ================================
# AI TestMind - 环境变量配置示例
# 复制此文件为 .env 并修改配置
# ================================
# Docker 配置
# ================================
# Docker 镜像仓库地址
# - Docker Hub: docker.io
# - 阿里云: registry.cn-hangzhou.aliyuncs.com
# - Harbor: harbor.example.com
DOCKER_REGISTRY=docker.io
# Docker Hub 用户名或命名空间
# 例如: yourname, your-company
DOCKER_USERNAME=yourname
# 镜像版本号
# 例如: 1.0.0, 1.0, latest
VERSION=1.0.0
# 数据库配置
# ================================
# SQLite 数据库路径(默认)
# 注意:相对路径是相对于 prisma/schema.prisma 的位置
DATABASE_URL="file:./dev.db"
# 或使用 PostgreSQL(可选)
# DATABASE_URL="postgresql://user:password@localhost:5432/aitestmind"
# 或使用 MySQL(可选)
# DATABASE_URL="mysql://user:password@localhost:3306/aitestmind"
# 执行器配置
# ================================
# ⚠️ 服务器部署必读:
# 1. 必须创建 .env 文件(复制此文件:cp env.example .env)
# 2. 必须修改 NEXT_PUBLIC_EXECUTOR_URL 为服务器 IP 或域名
# 3. 修改后必须重新构建:npm run build
# ================================
# 执行器 API 监听地址(Python 后端监听的主机地址)
# 0.0.0.0 表示监听所有网络接口(推荐,允许远程访问)
# 127.0.0.1 表示只监听本地(更安全,但其他机器无法访问)
API_HOST=0.0.0.0
# 执行器 API 端口(Python 后端监听端口)
API_PORT=8001
# 执行器服务地址(服务端 API 路由调用,在同一台服务器可以用 localhost)
# 用途:Next.js 服务端代码调用执行器时使用
# 说明:这段代码在服务器上运行,可以用 localhost
EXECUTOR_URL=http://localhost:8001
# 执行器服务地址(浏览器访问,⚠️ 服务器部署时必须修改)
# 用途:浏览器端 JavaScript 调用执行器时使用
# 说明:这段代码在用户浏览器中运行,不能用 localhost
#
# 开发环境(本地): http://localhost:8001
# 生产环境(服务器): http://your-server-ip:8001 或 https://your-domain.com/executor
#
# ⚠️ 重要:
# - 开发环境:使用 localhost 即可
# - 服务器部署:必须改为服务器的 IP 地址或域名
# - 例如:http://192.168.1.100:8001 或 https://api.yourdomain.com
# - 修改后必须重新构建:npm run build
NEXT_PUBLIC_EXECUTOR_URL=http://localhost:8001
# AI 提供商配置(可选)
# ================================
# OpenAI
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx
OPENAI_BASE_URL=https://api.openai.com/v1
# DeepSeek(深度求索)
DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1
# Claude
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxx
# 百度文心一言
BAIDU_API_KEY=xxxxxxxxxxxxxxxxxxxx
BAIDU_SECRET_KEY=xxxxxxxxxxxxxxxxxxxx
# 阿里通义千问
DASHSCOPE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx
# 智谱 AI
ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxxx
# Ollama(本地部署)
OLLAMA_BASE_URL=http://localhost:11434
# 应用配置
# ================================
# 运行环境
NODE_ENV=development
# 服务端口
PORT=3000
# 日志级别
LOG_LEVEL=info
# 其他配置
# ================================
# 禁用遥测
NEXT_TELEMETRY_DISABLED=1
# 主机名
HOSTNAME=0.0.0.0