mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2025-12-06 13:54:41 +08:00
fix(docker): use curl instead of wget for better compatibility
根據 @xqliu 建議,將 healthcheck 改用 curl 代替 wget。 Changes: - Backend healthcheck: wget → curl -f - Frontend healthcheck: wget → curl -f - 保留 frontend 使用 127.0.0.1(避免 DNS 解析問題) Benefits: - curl 在大多數 Docker 基礎鏡像中都有預裝 - wget 在某些發行版可能缺失 - curl -f 會在 HTTP 錯誤時返回非零退出碼 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ services:
|
||||
networks:
|
||||
- nofx-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -45,7 +45,7 @@ services:
|
||||
depends_on:
|
||||
- nofx
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1/health"]
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user