安全:移除 .env 跟踪,添加 .env.example 模板

.env 含真实密钥不应入库,已在 .gitignore 中忽略。
新增 .env.example 作为配置模板(占位符)。
This commit is contained in:
2026-03-19 10:30:51 +08:00
parent 2ea35ad5d3
commit 13706bc55c
2 changed files with 25 additions and 23 deletions

25
.env.example Normal file
View File

@@ -0,0 +1,25 @@
# ===== 云端 API =====
CLOUD_API_URL=http://your-server:8000
WVP_API_URL=http://your-server:18080
# ===== 边缘设备 ID必须与 WVP 数据库 ROI 表的 device_id 一致) =====
EDGE_DEVICE_ID=edge
# ===== 配置同步模式REDIS=监听云端Stream, LOCAL=仅本地SQLite =====
CONFIG_SYNC_MODE=REDIS
# ===== 云端 Redis截图处理器 + 配置同步) =====
CLOUD_REDIS_HOST=your-redis-host
CLOUD_REDIS_PORT=6379
CLOUD_REDIS_DB=1
CLOUD_REDIS_PASSWORD=your-redis-password
# ===== 腾讯云 COS截图上传 =====
COS_REGION=ap-shanghai
COS_BUCKET=your-bucket-name
COS_SECRET_ID=your-cos-secret-id
COS_SECRET_KEY=your-cos-secret-key
# ===== 按算法独立置信度阈值 =====
ALGO_CONF_LEAVE_POST=0.4
ALGO_CONF_INTRUSION=0.6