-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
62 lines (48 loc) · 1.81 KB
/
Copy pathenv.example
File metadata and controls
62 lines (48 loc) · 1.81 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
# Easy VM Cloud 环境变量配置文件
# 复制此文件为 .env 并填入实际值
# =====================================
# 数据库配置 (PostgreSQL)
# =====================================
POSTGRES_DB=easy_vm_cloud
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
# 数据库连接 URL (Server 后端使用)
# 默认值: postgres://postgres:password@localhost/vmcloud
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/easy_vm_cloud
# =====================================
# Server 配置
# =====================================
# Server 监听端口 (默认: 3000)
SERVER_PORT=3000
# JWT 密钥 (生产环境必须使用强密钥,长度至少 32 字符)
# 默认值: change-me-in-production
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# JWT 过期时间
JWT_EXPIRATION=24h
# Server 日志级别 (trace, debug, info, warn, error)
# 默认值: debug
LOG_LEVEL=debug
# =====================================
# Agent 配置
# =====================================
# Agent 节点唯一标识 (UUID 格式,每个节点必须不同)
# 如果不设置,Agent 启动时会自动生成 UUID
NODE_ID=2162bcb3-a70c-4903-9b9d-524c0a5952dd
# Agent 节点名称 (可选,默认使用主机名)
NODE_NAME=agent-node-01
# Server WebSocket 连接地址 (默认: ws://localhost:3000/ws/agent)
SERVER_WS_URL=ws://localhost:3000/ws/agent
# 心跳间隔(秒)(默认: 30)
HEARTBEAT_INTERVAL=30
# 网络提供者接口(用于网络管理)(默认: eth0)
NETWORK_PROVIDER_INTERFACE=eth0
# =====================================
# 通用配置
# =====================================
# 全局日志级别 (trace, debug, info, warn, error)
# 可以细粒度控制,例如: server=debug,agent=info
RUST_LOG=debug
# 调试模式 (true/false)
DEBUG=true
# Agent 节点 IP 地址(用于注册到 Server)
NODE_IP=127.0.0.1