Skip to content

Commit

Permalink
fix: add health check to broker
Browse files Browse the repository at this point in the history
  • Loading branch information
lpcouto committed Feb 14, 2024
1 parent b9cde89 commit 04f1d2f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,26 @@ services:
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'true'
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
healthcheck:
test: ["CMD", "kafka-topics", "--bootstrap-server", "broker:9092", "--list"]
interval: 10s
timeout: 5s
retries: 5

schema-registry:
image: confluentinc/cp-schema-registry:7.2.1
hostname: schema-registry
container_name: schema-registry
depends_on:
- broker
broker:
condition: service_healthy
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:29092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081

kafka-tools:
image: confluentinc/cp-kafka:7.0.5
hostname: kafka
Expand Down

0 comments on commit 04f1d2f

Please sign in to comment.