feat: add multi-theme docker compose configuration and batch packaging scripts
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user