feat: add multi-theme docker compose configuration and batch packaging scripts

This commit is contained in:
2026-06-24 10:57:31 +08:00
parent 71203c66bb
commit 0c2149bfc0
12 changed files with 489 additions and 12 deletions

View File

@@ -5,6 +5,10 @@
# .\docs\docker\build-and-export-images.ps1 -Tag v1.2.3
# .\docs\docker\build-and-export-images.ps1 -UseCache
# .\docs\docker\build-and-export-images.ps1 -ExportOnly
#
# 四套主题玩家端一键打包(自动切分支,推荐):
# docs\docker\build-and-export-all-themes.bat
param(
[ValidateSet("all", "api", "player", "admin")]
@@ -34,20 +38,20 @@ function Get-DefaultOutput {
function Assert-ImageTag {
param([string]$Value)
if ($Value -notmatch '^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$') {
throw "镜像 tag 不合法: $Value"
throw "闀滃儚 tag 涓嶅悎娉? $Value"
}
}
if (-not (Test-Path $ComposeFile)) {
throw "未找到 $ComposeFile(当前目录: $Root"
throw "<EFBFBD>壘鍒?$ComposeFile锛堝綋鍓嶇洰褰? $Root?
}
if (-not (Test-Path $EnvFile)) {
if (Test-Path ".env.docker.example") {
Write-Warning "未找到 .env.docker使用 .env.docker.example(生产请复制并修改密钥)"
Write-Warning "<EFBFBD>壘鍒?.env.docker锛屼娇鐢?.env.docker.example锛堢敓浜ц<EFBFBD>澶嶅埗骞朵慨鏀瑰瘑閽ワ級"
$EnvFile = ".env.docker.example"
} else {
throw "未找到 .env.docker 或 .env.docker.example"
throw "<EFBFBD>壘鍒?.env.docker ?.env.docker.example"
}
}