Add private repo setup summary

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
bujie9527
2026-02-05 20:09:32 +08:00
parent b79efb9586
commit 2f1090f7cc

104
PRIVATE_REPO_SETUP.md Normal file
View File

@@ -0,0 +1,104 @@
# 私有仓库配置完成
## ✅ 配置状态
- ✅ Git 私有仓库已配置
- ✅ Docker Registry 已配置并测试连接
- ✅ 配置文件已创建
- ✅ 脚本已创建
## 📋 配置信息
### Git 仓库
- **远程名称**: `private`
- **仓库地址**: https://git.quanyu360.cn/admin/wecom-ai-assistant.git
- **用户名**: admin
- **密码**: 已配置
### Docker Registry
- **Registry URL**: git.quanyu360.cn
- **用户名**: admin
- **密码**: 已配置在 `.registry-config`
- **命名空间**: wecom-ai
## 🚀 使用方法
### 1. 推送代码到私有仓库
```powershell
# 推送到私有仓库(默认)
git push private main
# 推送到 GitHub
git push origin main
# 推送到两个仓库
git push private main
git push origin main
```
### 2. 推送 Docker 镜像
```powershell
# 测试 Registry 连接
docker login git.quanyu360.cn -u admin -p ye972030
# 构建并推送 Backend 镜像
docker build -f deploy/docker/backend.Dockerfile -t git.quanyu360.cn/wecom-ai/wecom-ai-backend:latest .
docker push git.quanyu360.cn/wecom-ai/wecom-ai-backend:latest
# 构建并推送 Admin 镜像
docker build -f deploy/docker/admin.Dockerfile -t git.quanyu360.cn/wecom-ai/wecom-ai-admin:latest .
docker push git.quanyu360.cn/wecom-ai/wecom-ai-admin:latest
```
### 3. 使用私有镜像部署
更新 `.env.prod`
```bash
REGISTRY_URL=git.quanyu360.cn
REGISTRY_NAMESPACE=wecom-ai
IMAGE_TAG=latest
```
在生产服务器上登录:
```bash
docker login git.quanyu360.cn -u admin -p ye972030
```
然后部署:
```bash
docker-compose -f docker-compose.prod.yml --env-file .env.prod up -d
```
## 📝 配置文件
- `.registry-config` - Docker Registry 配置(不提交到 Git
- `.registry-config.example` - 配置模板(可提交)
## 🔍 验证
### 检查 Git 远程仓库
```powershell
git remote -v
```
应该看到:
- `origin` → GitHub
- `private` → 私有仓库
### 测试 Docker Registry
```powershell
docker login git.quanyu360.cn -u admin -p ye972030
```
## 📚 详细文档
查看 `docs/private-registry-setup.md` 获取完整配置指南。