Files
macos-tools/contexts/ai-context-dev.md
bruno 435834dc79 feat: Harbor 版本化配置
- 添加 Harbor 快速恢复脚本 (harbor-quick-restore.sh)
- 添加完整恢复指南 (HARBOR-RESTORE-GUIDE.md)
- 添加版本信息文件 (VERSION.md)
- 更新 .gitignore 排除敏感数据
- 配置 harbor git remote
- 修复 Cloudflare Tunnel 配置

系统重装后可通过以下命令快速恢复:
git clone http://192.168.1.83:33000/gao/ljwx-harbor.git
cd ljwx-harbor
./harbor-quick-restore.sh
2026-02-27 08:12:30 +08:00

1.7 KiB

AI Development Context - Development Scenario

生成时间: 2025-12-30 22:59:36 | 场景: 开发环境

开发工具链

容器和编排

  • Docker: 28.5.2

    • 镜像: 972 个
    • 容器: 222 运行中 / 382 总数
  • Kubernetes: 已安装

    • 集群: orbstack
    • 命名空间: 28 个
  • Helm: v4.0.0+g99cd196

    • Releases: 15 个

编程语言

  • Python: 3.12.12

  • Node.js: v21.7.3

    • npm: v11.7.0
  • Go: go1.25.5

AI 工具

开发服务

Gitea (代码托管)

  • 状态: ❌ 未运行
  • 启动: cd ~/ops/gitea && ./gitea-data-protection.sh start

Harbor (镜像仓库)

  • 状态: ✅ 运行中
  • 访问: http://192.168.1.83:8080
  • 推送镜像:
    docker tag myimage:tag harbor.omniverseai.net:8080/library/myimage:tag
    docker push harbor.omniverseai.net:8080/library/myimage:tag
    

开发工作流

1. 本地开发

# 启动开发环境
docker-compose up -d

# 运行测试
pytest / npm test / go test

# 构建镜像
docker build -t myapp:latest .

2. 推送到仓库

# Git 推送
git push origin main

# 镜像推送
docker tag myapp:latest harbor.omniverseai.net:8080/library/myapp:latest
docker push harbor.omniverseai.net:8080/library/myapp:latest

3. 部署到 K8s

# 应用配置
kubectl apply -f deployment.yaml

# 查看状态
kubectl get pods
kubectl logs -f <pod-name>

常用路径

  • 项目根目录: /Users/brunogao/work/codes/tools/macos
  • 脚本目录: /Users/brunogao/work/codes/tools/macos/scripts
  • K8s 工具: /Users/brunogao/work/codes/tools/macos/k8s
  • 数据目录: ~/ops/data
  • 备份目录: ~/ops/backups