This commit is contained in:
@@ -10,13 +10,14 @@ $requiredFiles = @(
|
||||
"rtc-app-key",
|
||||
"volc-access-key-id",
|
||||
"volc-secret-access-key",
|
||||
"ark-api-key",
|
||||
"voice-chat-template.json",
|
||||
"local-rtc.env"
|
||||
)
|
||||
|
||||
foreach ($name in $requiredFiles) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $runtimeDirectory $name) -PathType Leaf)) {
|
||||
throw "缺少 $name,请先运行 .\deploy\local-rtc\configure.ps1"
|
||||
throw "Missing $name. Run .\deploy\local-rtc\configure.ps1 first."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +36,9 @@ try {
|
||||
"callbacks", "mock-alert-receiver", "mock-provider", "api", "worker"
|
||||
)
|
||||
& docker @arguments
|
||||
if ($LASTEXITCODE -ne 0) { throw "Docker Compose 启动失败" }
|
||||
if ($LASTEXITCODE -ne 0) { throw "Docker Compose startup failed." }
|
||||
|
||||
Write-Host "`n等待本地 API 就绪..." -ForegroundColor Cyan
|
||||
Write-Host "`nWaiting for local API readiness..." -ForegroundColor Cyan
|
||||
$deadline = [DateTime]::UtcNow.AddMinutes(3)
|
||||
do {
|
||||
Start-Sleep -Seconds 2
|
||||
@@ -48,9 +49,9 @@ try {
|
||||
catch { }
|
||||
} while ([DateTime]::UtcNow -lt $deadline)
|
||||
|
||||
if (-not $health) { throw "本地 API 未在三分钟内就绪,请检查 docker compose logs api worker" }
|
||||
Write-Host "本地真实 RTC 后端已就绪:http://localhost:58080" -ForegroundColor Green
|
||||
Write-Host "现在可以启动 Windows 语音终端模拟器。" -ForegroundColor Green
|
||||
if (-not $health) { throw "Local API did not become ready within three minutes. Check docker compose logs api worker." }
|
||||
Write-Host "Local real RTC backend is ready: http://localhost:58080" -ForegroundColor Green
|
||||
Write-Host "You can now start the Windows voice device simulator." -ForegroundColor Green
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
|
||||
Reference in New Issue
Block a user