From f44a9a39e58ea34d81c1bd4c3eb24faa1f5929d8 Mon Sep 17 00:00:00 2001 From: wangbo Date: Mon, 11 May 2026 19:18:42 +0800 Subject: [PATCH] =?UTF-8?q?chore(docker):=20=E4=B8=BA=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=B7=BB=E5=8A=A0=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5065265..d2337b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -113,6 +113,12 @@ services: # 日志大小设置,避免日志文件过大 env_file: - .env + healthcheck: + test: ["CMD-SHELL", "node -e \"require('http').get('http://127.0.0.1:3001/health', (res) => { res.resume(); process.exit(res.statusCode === 200 ? 0 : 1); }).on('error', () => process.exit(1))\""] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s logging: driver: "json-file" options: