From cb4a7eadac65cf75f7f66d3440276d5a8cfa1f0d Mon Sep 17 00:00:00 2001 From: Jp Date: Mon, 2 Feb 2026 01:01:12 +0800 Subject: [PATCH] ci(docker): increase health check start period and use localhost IP - Increase start_period from 5s to 10s to allow more time for service initialization - Change health check URL from localhost to 127.0.0.1 for better compatibility --- Dockerfile | 4 ++-- data/sessions.db | Bin 12288 -> 12288 bytes docker-compose.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bdfddcb..7c6fc29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN npm run build EXPOSE 3000 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1 +HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/health || exit 1 CMD ["npm", "start"] diff --git a/data/sessions.db b/data/sessions.db index f134a8403c067a82b5fa99a5e33dc5a04079a357..abf85578db17ca779d30bf08de1d33646010c451 100644 GIT binary patch delta 179 zcmZojXh@hK&DcFr#+k8uW5N=CE@nPP2EHZy?tF|J3s><@-XZI$->6{C>dW3(92#m6 zkX%}xm*%b;7H?E+;agSZQ{bLlW$azw*Uo{@{0eJwaH1lh!F#9qRGT0iVX!07MF}L*90FOmC AKmY&$ delta 133 zcmZojXh@hK&Db?j#+k8eW5N=C4ko@O417!Y-8UAl;hnrg)^qX%d0l2xbF;|@tjFZ>MDNMeluLc0yDJ;(b diff --git a/docker-compose.yml b/docker-compose.yml index 778e14a..9b03945 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ services: - PORT=3000 - NODE_ENV=production healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/health"] interval: 30s timeout: 3s retries: 3 - start_period: 5s + start_period: 10s