d-robotics 8369b7e951 Restore local dev toolkit (recovered after working copy loss)
- scripts/local/env-local.sh + run-operator.sh (verified working again)
- local-samples for json_to_csv + video_slice
- docs/local-dev-guide.zh-CN.md + docs/release-checklist.zh-CN.md
2026-09-17 19:17:54 +08:00

29 lines
1.1 KiB
Bash
Executable File
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.

#!/usr/bin/env bash
# 本地开发环境变量(source 方式使用:source scripts/local/env-local.sh)
#
# 隔离边界(务必遵守):
# - MONGO_URI 只指向本机 127.0.0.1 的本地 MongoDB 容器,绝不指向公司实例
# - 不导出 KUBECONFIG,不使用公司集群凭据
# - BOS/AI 变量全部留空:本地不访问百度 BOS,AI 生成功能禁用
# - 数据源一律使用本地路径(local-samples/ 或自建目录)
export MONGO_URI="mongodb://127.0.0.1:27017/droboticflow-local"
export MONGO_DB="droboticflow-local"
export MONGO_CONNECT_RETRIES=5
export MONGO_CONNECT_RETRY_DELAY_MS=1000
# API / 前端
export PORT=3001
export VITE_DEV_API_BASE_URL="http://127.0.0.1:3001"
export VITE_DEV_WORKER_BASE_URL="http://127.0.0.1:3002"
# 可选外部依赖:本地全部禁用
unset BOS_ENDPOINT || true
unset AI_API_KEY || true
unset AI_API_BASE_URL || true
unset AI_MODEL || true
unset KUBECONFIG || true
echo "[env-local] 本地环境已加载:Mongo=127.0.0.1:27017/droboticflow-local, API=:3001"
echo "[env-local] 提醒:Go 进程不读取 .env.local,环境变量必须像这样 source 导出"