修复开发容器启动并加固部署配置
This commit is contained in:
@@ -552,9 +552,10 @@ PY
|
||||
|
||||
check_http_endpoint() {
|
||||
local path="$1"
|
||||
local max_attempts="${2:-10}"
|
||||
local url="${BASE_URL%/}$path"
|
||||
log "探测接口: $url"
|
||||
local attempt=1 max_attempts=10 delay=2 warmup_delay=3
|
||||
local attempt=1 delay=2 warmup_delay=3
|
||||
log "等待服务预热 ${warmup_delay}s …"
|
||||
sleep "$warmup_delay"
|
||||
while [[ "$attempt" -le "$max_attempts" ]]; do
|
||||
@@ -584,6 +585,9 @@ run_health_checks() {
|
||||
step "探测 HTTP 接口可用性"
|
||||
check_http_endpoint "/health"
|
||||
check_http_endpoint "/api/v1/auth/login-key"
|
||||
if [[ "$TARGET_ENV" == "dev" ]]; then
|
||||
check_http_endpoint "/" 60
|
||||
fi
|
||||
ok "HTTP 接口全部就绪"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user