Skip to content

Commit 5145704

Browse files
CodFrmclaude
andcommitted
🐛 修复 entrypoint 健康检测:支持 302 重定向响应
/ 路径会根据语言 302 重定向,busybox wget --spider 可能不认为 302 是成功响应。改为检测任意 HTTP 响应头即可判定服务已启动。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0692ab9 commit 5145704

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deploy/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SERVER_PID=$!
88
# Wait for the server to be ready
99
echo "Waiting for Next.js server to start..."
1010
for i in $(seq 1 30); do
11-
if wget -q --spider http://localhost:3000/ 2>/dev/null; then
11+
if wget -q -S --spider http://localhost:3000/ 2>&1 | grep -q "HTTP/"; then
1212
echo "Server is up, starting warmup..."
1313
break
1414
fi

0 commit comments

Comments
 (0)