From 235af62d433622935e796d43c5d9f371d0b376e5 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Mon, 1 Sep 2025 10:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=83=A8=E7=BD=B2=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerComposeShells/.env | 2 +- DockerComposeShells/docker-compose.yml | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/DockerComposeShells/.env b/DockerComposeShells/.env index c27faa2..2e1bfca 100644 --- a/DockerComposeShells/.env +++ b/DockerComposeShells/.env @@ -1,5 +1,5 @@ # 服务器配置 -SERVER_IP=47.110.53.196 +SERVER_IP=192.168.111.174 # Pulsar配置 PULSAR_BROKER_PORT=9093 diff --git a/DockerComposeShells/docker-compose.yml b/DockerComposeShells/docker-compose.yml index 8a87ab4..e702848 100644 --- a/DockerComposeShells/docker-compose.yml +++ b/DockerComposeShells/docker-compose.yml @@ -127,6 +127,12 @@ services: volumes: - pulsar-broker-data:/pulsar/data - ./pulsar/auth:/pulsar/auth + healthcheck: + test: ["CMD", "bin/pulsar-admin", "--admin-url", "http://localhost:${PULSAR_ADMIN_PORT}", "--auth-plugin", "org.apache.pulsar.client.impl.auth.AuthenticationBasic", "--auth-params", '{"userId":"${PULSAR_ADMIN_USER}","password":"${PULSAR_ADMIN_PASSWORD}"}', "clusters", "list"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s pulsar-init: image: registry.cn-qingdao.aliyuncs.com/jisheyun/pulsar:4.0.6 @@ -157,7 +163,8 @@ services: echo 'Pulsar initialization completed with Basic Authentication!'; " depends_on: - - broker + broker: + condition: service_healthy networks: - pulsar-net @@ -269,10 +276,10 @@ services: condition: service_started iotdb-standalone-service: condition: service_started + zookeeper: + condition: service_healthy broker: - condition: service_started - pulsar-cluster-init: - condition: service_completed_successfully + condition: service_healthy networks: - pulsar-net @@ -292,7 +299,7 @@ services: tty: true depends_on: admin-api-service: - condition: service_completed_successfully + condition: service_started networks: - pulsar-net