feat: integrate AbstractWizard for initialization
- Add wizard service (git.hangman-lab.top/hzhang/abstract-wizard:latest) - Add wizard-init service: uploads init-config on first deploy - Backend reads wizard config on startup, creates admin user + default project - Add init-config/harborforge.json with default admin credentials - Update README with initialization docs - Startup order: mysql → wizard → wizard-init → backend → frontend
This commit is contained in:
18
README.md
18
README.md
@@ -34,11 +34,29 @@ docker compose up -d
|
||||
宿主机 nginx (80/443)
|
||||
├── / → frontend (Docker, port 3000)
|
||||
└── /api/ → backend (Docker, port 8000)
|
||||
|
||||
Docker 内部:
|
||||
wizard (AbstractWizard) → 初始化配置管理
|
||||
wizard-init → 首次启动上传默认配置
|
||||
backend → 启动时从 wizard 读取配置,创建 admin 用户等
|
||||
```
|
||||
|
||||
前端 Docker 容器不包含 nginx,使用轻量的 `serve` 提供静态文件。
|
||||
API 代理由宿主机 nginx 统一处理。
|
||||
|
||||
### AbstractWizard 初始化
|
||||
|
||||
首次部署时,`wizard-init` 会将 `init-config/harborforge.json` 上传到 AbstractWizard。
|
||||
后端启动时自动从 AbstractWizard 读取配置并创建 admin 用户和默认项目。
|
||||
|
||||
修改初始化配置:
|
||||
```bash
|
||||
# 直接编辑 init-config/harborforge.json(首次部署前)
|
||||
# 或通过 AbstractWizard API 修改(部署后)
|
||||
curl -X PATCH http://localhost:18080/api/v1/config/harborforge.json \
|
||||
-d '{"admin": {"password": "new_secure_password"}}'
|
||||
```
|
||||
|
||||
### 宿主机 nginx 配置
|
||||
|
||||
参考 `nginx-host.conf.example`,复制到 `/etc/nginx/sites-available/` 并修改域名。
|
||||
|
||||
Reference in New Issue
Block a user