feat: add multi-theme docker compose configuration and batch packaging scripts
This commit is contained in:
@@ -14,8 +14,13 @@
|
||||
|------|----------|
|
||||
| `docs/docker/build-and-export-images.bat` | Windows(CMD,构建全部) |
|
||||
| `docs/docker/build-and-export-api.bat` | Windows(仅 api,可双击) |
|
||||
| `docs/docker/build-and-export-player.bat` | Windows(仅 player,可双击) |
|
||||
| `docs/docker/build-and-export-player.bat` | Windows(仅单分支 player,可双击) |
|
||||
| `docs/docker/build-and-export-player-main.bat` | Windows(仅主站/暗金主题,自动切分支) |
|
||||
| `docs/docker/build-and-export-player-theme-2.bat` | Windows(仅 theme-2 蓝白主题,自动切分支) |
|
||||
| `docs/docker/build-and-export-player-theme-3.bat` | Windows(仅 theme-3 移动主题,自动切分支) |
|
||||
| `docs/docker/build-and-export-player-theme-4.bat` | Windows(仅 theme-4 海军蓝极简,自动切分支) |
|
||||
| `docs/docker/build-and-export-admin.bat` | Windows(仅 admin,可双击) |
|
||||
| `docs/docker/build-and-export-all-themes.bat` | Windows(**四套主题 player 一键打包**,自动切分支) |
|
||||
| `docs/docker/build-and-export-images.ps1` | Windows(PowerShell) |
|
||||
| `docs/docker/build-and-export-images.sh` | Linux / macOS / Git Bash |
|
||||
|
||||
@@ -118,6 +123,65 @@ docs\docker\build-and-export-images.bat --export-only
|
||||
|
||||
---
|
||||
|
||||
## 三、四套主题玩家端打包
|
||||
|
||||
> 关联文档:[四套主题Docker部署任务.md](../四套主题Docker部署任务.md)「阶段 C」
|
||||
|
||||
### 一键打包(推荐)
|
||||
|
||||
脚本会自动:切到各主题分支 → 构建 player 镜像 → 导出 tar → 切回原分支 → 构建 api/admin。
|
||||
|
||||
```bat
|
||||
cd C:\path\to\thebet365
|
||||
docs\docker\build-and-export-all-themes.bat
|
||||
```
|
||||
|
||||
可选参数:
|
||||
|
||||
| 参数 | 说明 |
|
||||
|------|------|
|
||||
| `--use-cache` | 使用 Docker 层缓存,加快重复构建速度 |
|
||||
| `--export-only` | 跳过构建,仅导出本地已有镜像 |
|
||||
| `--skip-api-admin` | 只打四套 player,跳过 api/admin |
|
||||
|
||||
### 产物
|
||||
|
||||
| tar 文件 | 加载后镜像名 |
|
||||
|----------|----------------|
|
||||
| `thebet365-player-main.tar` | `thebet365-player:main` |
|
||||
| `thebet365-player-theme-2.tar` | `thebet365-player:theme-2` |
|
||||
| `thebet365-player-theme-3.tar` | `thebet365-player:theme-3` |
|
||||
| `thebet365-player-theme-4.tar` | `thebet365-player:theme-4` |
|
||||
| `thebet365-images-latest.tar` | `thebet365-api:latest` + `thebet365-admin:latest` |
|
||||
|
||||
### 分支要求
|
||||
|
||||
- 执行前确保 `main`、`theme-2`、`theme-3`、`theme-4` 四个分支在本地均已拉取
|
||||
- 工作区若有未提交变更,脚本会给出 WARN;建议先 `git stash` 后再运行
|
||||
- 若某一分支切换失败,该分支会被跳过并标记失败,其余分支仍继续构建
|
||||
|
||||
### 手动逐一打包(有明确失败时)
|
||||
|
||||
```bat
|
||||
git checkout main
|
||||
docs\docker\build-and-export-images.bat --service player --tag main
|
||||
|
||||
git checkout theme-2
|
||||
docs\docker\build-and-export-images.bat --service player --tag theme-2
|
||||
|
||||
git checkout theme-3
|
||||
docs\docker\build-and-export-images.bat --service player --tag theme-3
|
||||
|
||||
git checkout theme-4
|
||||
docs\docker\build-and-export-images.bat --service player --tag theme-4
|
||||
|
||||
REM 最后打 api + admin
|
||||
git checkout main
|
||||
docs\docker\build-and-export-images.bat --tag latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 四、构建产物
|
||||
|
||||
| 镜像名 | 说明 |
|
||||
|
||||
Reference in New Issue
Block a user