Created
May 8, 2024 13:46
-
-
Save Wirone/a8970b495ee4948a264ecf2008e8b008 to your computer and use it in GitHub Desktop.
Kafka replacement after `wurstmeister` disappeared from Docker Hub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See: https://quay.io/repository/strimzi/kafka | |
# See: https://github.com/wurstmeister/zookeeper-docker/issues/31 | |
services: | |
kafka: | |
image: quay.io/strimzi/kafka:${KAFKA_VERSION:-0.32.0-kafka-3.3.1} | |
command: [ | |
"sh", "-c", | |
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" | |
] | |
hostname: kafka-1 | |
restart: on-failure | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ADVERTISED_HOST_NAME: kafka-1 | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092 | |
KAFKA_ADVERTISED_PORT: 9092 | |
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
LOG_DIR: "/tmp/logs" | |
depends_on: | |
zookeeper: | |
condition: service_started | |
zookeeper: | |
image: quay.io/strimzi/kafka:${KAFKA_VERSION:-0.32.0-kafka-3.3.1} | |
hostname: zookeeper | |
command: [ | |
"sh", "-c", | |
"bin/zookeeper-server-start.sh config/zookeeper.properties" | |
] | |
healthcheck: | |
test: [ "CMD-SHELL", "echo mntr | nc localhost 2181" ] | |
interval: 5s | |
timeout: 5s | |
retries: 5 | |
environment: | |
LOG_DIR: /tmp/logs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment