From 2e7a3ad2d6ed11d7bb7d62261aff5cb56200bdd4 Mon Sep 17 00:00:00 2001 From: Vaica <94612053+zqlit@users.noreply.github.com> Date: Sun, 21 Jun 2026 22:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- write-server/docker-compose.yml | 10 +++++----- write-server/scripts/healthcheck.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/write-server/docker-compose.yml b/write-server/docker-compose.yml index cb1c2775..063fd85f 100644 --- a/write-server/docker-compose.yml +++ b/write-server/docker-compose.yml @@ -13,8 +13,8 @@ services: ports: - "8016:8016" volumes: - # Hugo 博客目录(必须) - - ${BLOG_ROOT:-../blog}:/blog + # Hugo 博客目录(必须)- .. 即为 write-server 的上级目录(博客根目录) + - ${BLOG_ROOT:-..}:/blog # 本地回收站目录 - ./recycle:/app/recycle # 日志目录 @@ -31,11 +31,11 @@ services: networks: - write-network healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8016/api/stats"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:8016/api/stats"] interval: 30s timeout: 10s retries: 3 - start_period: 40s + start_period: 60s logging: driver: "json-file" options: @@ -57,7 +57,7 @@ services: - ./logs/nginx:/var/log/nginx depends_on: write-server: - condition: service_healthy + condition: service_started networks: - write-network diff --git a/write-server/scripts/healthcheck.sh b/write-server/scripts/healthcheck.sh index 9d148494..5e6a91d9 100644 --- a/write-server/scripts/healthcheck.sh +++ b/write-server/scripts/healthcheck.sh @@ -6,7 +6,7 @@ set -e # 配置 PORT=${PORT:-8016} -HOST=${HOST:-localhost} +HOST=${HOST:-127.0.0.1} TIMEOUT=${HEALTH_CHECK_TIMEOUT:-5} # 检查服务是否响应