This commit is contained in:
+3
-3
@@ -5,12 +5,12 @@ Set-Location -LiteralPath $projectRoot
|
||||
docker compose config --quiet
|
||||
docker compose up --build -d
|
||||
|
||||
Write-Host '等待 API 就绪...'
|
||||
Write-Host 'Waiting for API readiness...'
|
||||
for ($attempt = 1; $attempt -le 60; $attempt++) {
|
||||
try {
|
||||
$response = Invoke-RestMethod -Uri 'http://localhost:58080/health/ready' -TimeoutSec 2
|
||||
if ($response.data.status -eq 'ready') {
|
||||
Write-Host '本地环境已就绪:'
|
||||
Write-Host 'Local environment is ready:'
|
||||
Write-Host ' Web http://localhost:3100'
|
||||
Write-Host ' API http://localhost:58080'
|
||||
Write-Host ' Callbacks http://localhost:58081'
|
||||
@@ -25,4 +25,4 @@ for ($attempt = 1; $attempt -le 60; $attempt++) {
|
||||
}
|
||||
|
||||
docker compose ps
|
||||
throw 'API在约定时间内未就绪,请执行 docker compose logs api postgres redis migrate 查看原因。'
|
||||
throw 'API did not become ready in time. Run docker compose logs api postgres redis migrate for details.'
|
||||
|
||||
Reference in New Issue
Block a user