From e3a77eae80f2223d1edec2b6f8c36b1f25ecc872 Mon Sep 17 00:00:00 2001 From: chunzhi <60135925+chunzhimoe@users.noreply.github.com> Date: Thu, 11 May 2023 16:15:36 +0800 Subject: [PATCH] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 538b1913..0fef5b82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: # SESSION_SECRET: random_string # SQL_DSN: root:123456@tcp(localhost:3306)/one-api healthcheck: - test: ["CMD", "curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", "http://localhost:3000/api/status", "|", "grep", "200"] # 改为 curl 检测状态 + test: ["CMD-SHELL", "curl -s http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk '{print $2}' | grep 'true'"] interval: 30s timeout: 10s retries: 3