Update Gitea URL to https://git.ityb.me
- DESIGN.md: update Gitea URL in online addresses table - OPS_MANUAL.md: update all Gitea references, add gitea.conf section, update service architecture diagram Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a838fcc7a8
commit
5472649e89
@ -13,7 +13,7 @@ CareerBot 是一个个人职业展示网站,集成了 AI 智能对话助手。
|
||||
|------|------|
|
||||
| 主页 | `http://www.ityb.me/careerbot/` |
|
||||
| 管理后台 | `http://www.ityb.me/careerbot/admin/login` |
|
||||
| Gitea 代码仓库 | `http://www.ityb.me:3000` |
|
||||
| Gitea 代码仓库 | `https://git.ityb.me` |
|
||||
|
||||
### 技术栈
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ ssh root@39.106.14.107 # root 直连
|
||||
|------|------|------|------|
|
||||
| CareerBot 主页 | `http://www.ityb.me/careerbot/` | (访问令牌或匿名) | - |
|
||||
| CareerBot 管理后台 | `http://www.ityb.me/careerbot/admin/login` | `ln0422@gmail.com` | `qshs123456` |
|
||||
| Gitea 代码管理 | `http://www.ityb.me:3000` | `ln0422` | `Qshs123456_` |
|
||||
| Gitea 代码管理 | `https://git.ityb.me` | `ln0422` | `Qshs123456_` |
|
||||
|
||||
### 2.3 ECS 用户密码
|
||||
|
||||
@ -69,8 +69,12 @@ ssh root@39.106.14.107 # root 直连
|
||||
│ → proxy_pass http://127.0.0.1:8000/careerbot/ │
|
||||
│ → CareerBot (uvicorn, FastAPI prefix=/careerbot) │
|
||||
├──────────────────────────────────────────────────────┤
|
||||
│ http://www.ityb.me:3000 │
|
||||
│ → Gitea (直接监听,未经 Nginx 代理) │
|
||||
│ https://git.ityb.me │
|
||||
│ → proxy_pass http://127.0.0.1:3000 │
|
||||
│ → Gitea │
|
||||
│ │
|
||||
│ http://39.106.14.107:3000 (向后兼容) │
|
||||
│ → Gitea (直接监听端口) │
|
||||
└──────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
@ -108,9 +112,11 @@ ssh root@39.106.14.107 # root 直连
|
||||
/etc/nginx/
|
||||
├── nginx.conf ← Nginx 主配置
|
||||
├── sites-available/
|
||||
│ └── careerbot.conf ← CareerBot 站点配置
|
||||
│ ├── careerbot.conf ← CareerBot 站点配置
|
||||
│ └── gitea.conf ← Gitea 站点配置
|
||||
└── sites-enabled/
|
||||
└── careerbot.conf → ../sites-available/careerbot.conf
|
||||
├── careerbot.conf → ../sites-available/careerbot.conf
|
||||
└── gitea.conf → ../sites-available/gitea.conf
|
||||
|
||||
/usr/local/bin/gitea ← Gitea 二进制文件
|
||||
/etc/gitea/app.ini ← Gitea 配置文件
|
||||
@ -262,6 +268,37 @@ server {
|
||||
- `client_max_body_size 10M`:允许上传最大 10MB 文件
|
||||
- 静态文件和上传文件通过 FastAPI StaticFiles 挂载在 `/careerbot/static/` 和 `/careerbot/uploads/`,无需单独 Nginx location
|
||||
|
||||
### 6.3 Gitea 站点配置
|
||||
|
||||
文件:`/etc/nginx/sites-available/gitea.conf`(HTTPS 部分由 certbot 自动生成)
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.ityb.me;
|
||||
client_max_body_size 512M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
# certbot 自动追加 443 监听块 + 80→443 重定向
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/git.ityb.me/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/git.ityb.me/privkey.pem;
|
||||
}
|
||||
```
|
||||
|
||||
关键说明:
|
||||
- `client_max_body_size 512M`:支持大仓库 push/pull
|
||||
- Gitea 仍在本机 3000 端口监听,Nginx 反向代理到 443(HTTPS)
|
||||
- 端口 3000 保持对外开放作为备用访问方式
|
||||
- 对应 Gitea 配置 `/etc/gitea/app.ini`:`ROOT_URL=https://git.ityb.me/`、`DOMAIN=git.ityb.me`、`SSH_DOMAIN=git.ityb.me`
|
||||
|
||||
### 6.3 防火墙规则
|
||||
|
||||
```bash
|
||||
@ -373,13 +410,13 @@ ps aux --sort=-rss | head -10
|
||||
|
||||
后续在同一台 ECS 上部署新项目的标准流程:
|
||||
|
||||
1. **Gitea 上创建仓库**:`http://www.ityb.me:3000` → New Repository
|
||||
1. **Gitea 上创建仓库**:`https://git.ityb.me` → New Repository
|
||||
|
||||
2. **本地推送代码**
|
||||
3. **ECS 上克隆并配置**:
|
||||
```bash
|
||||
cd ~/apps
|
||||
git clone http://www.ityb.me:3000/ln0422/新项目.git
|
||||
git clone https://git.ityb.me/ln0422/新项目.git
|
||||
# 安装依赖、初始化等
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user