13693261870
23 小时以前 9b5661ebf15f5536748849493cb8b65a6c3644dd
修改健康检测
已修改1个文件
9 ■■■■■ 文件已修改
docker-compose/docker-compose.yml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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