Created
December 23, 2022 16:15
-
-
Save dalelane/c9f78a85872f6c778672cd68cbb69c94 to your computer and use it in GitHub Desktop.
running development instance of IBM Event Streams using Docker Compose
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
version: "3" | |
services: | |
zookeeper: | |
platform: linux/amd64 | |
image: cp.icr.io/cp/ibm-eventstreams-kafka:11.1.2 | |
container_name: zookeeper | |
hostname: zookeeper | |
command: | |
[ | |
"sh", "-c", | |
"bin/zookeeper-server-start.sh config/zookeeper.properties", | |
] | |
healthcheck: | |
test: echo srvr | nc 127.0.0.1 2181 | |
interval: 1m | |
timeout: 10s | |
retries: 20 | |
start_period: 30s | |
ports: | |
- 2181:2181 | |
environment: | |
LOG_DIR: /tmp/logs | |
kafka: | |
platform: linux/amd64 | |
image: cp.icr.io/cp/ibm-eventstreams-kafka:11.1.2 | |
container_name: kafka | |
hostname: kafka | |
command: | |
[ | |
"sh", "-c", | |
"bin/kafka-server-start.sh config/server.properties \ | |
--override listeners=$${KAFKA_LISTENERS} \ | |
--override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} \ | |
--override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} \ | |
--override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} \ | |
--override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}", | |
] | |
healthcheck: | |
test: test -f /tmp/kafka-ready | |
interval: 10s | |
timeout: 30s | |
retries: 20 | |
start_period: 30s | |
depends_on: | |
zookeeper: | |
condition: service_healthy | |
ports: | |
- 9092:9092 | |
- 29092:9092 | |
environment: | |
LOG_DIR: /tmp/logs | |
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT | |
KAFKA_LISTENERS: EXTERNAL://0.0.0.0:9092,INTERNAL://kafka:29092 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
KAFKA_OPTS: -javaagent:/opt/kafka/libs/kafka-agent-0.31.1.jar=/tmp/kafka-ready:/tmp/zk-connected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment