From de66a3ebf93e43e3c0d118dd10c39413d13c6fdc Mon Sep 17 00:00:00 2001 From: 05412 Date: Wed, 14 Aug 2024 14:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=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 --- compose.yaml | 2 +- nginx.conf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 5cd1eba..12d9626 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,7 +9,7 @@ services: - "./dist:/usr/share/nginx/html:ro" - "./nginx.conf:/etc/nginx/nginx.conf" healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost/health"] interval: 30s timeout: 10s retries: 5 diff --git a/nginx.conf b/nginx.conf index 2233d41..1d09286 100644 --- a/nginx.conf +++ b/nginx.conf @@ -46,6 +46,11 @@ http { index index.html index.htm; } + location /health { + add_header Content-Type text/plain; + return 200 "OK"; + } + #error_page 404 /404.html;