From 9b5661ebf15f5536748849493cb8b65a6c3644dd Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 24 七月 2025 11:34:01 +0800
Subject: [PATCH] 修改健康检测

---
 docker-compose/docker-compose.yml |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index 8095e61..995b1ef 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -22,12 +22,13 @@
       TZ: Asia/Shanghai
       MYSQL_DATABASE: 'se-cloud'
       MYSQL_ROOT_PASSWORD: My_Sql_s!E_v5.7
+      MYSQL_INITDB_SKIP_TZINFO: "1"
     healthcheck:
-      test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
+      test: ["CMD-SHELL", "mysql -uroot -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1' || exit 1"]
       interval: 10s
       timeout: 2s
       retries: 3
-      start_period: 5s
+      start_period: 10s
     networks:
       - network-se
     restart: always
@@ -44,7 +45,9 @@
       - "8848:8848"
       - "9848:9848"
     healthcheck:
-      test: [ "CMD-SHELL", "curl -f http://localhost:8848 || exit 1" ]
+      #test: [ "CMD-SHELL", "curl -f http://localhost:8848/" ]
+      #test: ["CMD", "nc", "-z", "localhost", "8848"]
+      test: ["CMD-SHELL", "curl -f http://localhost:8848/nacos/actuator/health || exit 1"]
       interval: 10s
       timeout: 2s
       retries: 3

--
Gitblit v1.9.3