Last active
October 16, 2022 15:27
-
-
Save thecaffeinedev/6a766fce2427f45c647cf4a46ba6053a to your computer and use it in GitHub Desktop.
Kafka, Zookeeper and Kafka Manager - Docker Compose M1 Mac
This file contains 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.1' | |
services: | |
zookeeper: | |
platform: linux/amd64 | |
container_name: zookeeper | |
image: zookeeper:3.4 | |
restart: on-failure | |
volumes: | |
- "./zookeeper/data:/data" | |
- "./zookeeper/logs:/datalog" | |
ports: | |
- "2181:2181" | |
network_mode: "host" | |
kafka: | |
platform: linux/amd64 | |
container_name: kafka | |
image: wurstmeister/kafka:1.0.0 | |
restart: on-failure | |
depends_on: | |
- zookeeper | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
environment: | |
- KAFKA_ZOOKEEPER_CONNECT=${DOCKER_KAFKA_HOST}:2181 | |
- KAFKA_ADVERTISED_HOST_NAME=${DOCKER_KAFKA_HOST} | |
- JMX_PORT=9093 | |
- KAFKA_ADVERTISED_PORT=9092 | |
- KAFKA_DELETE_TOPIC_ENABLE=true | |
- KAFKA_LOG_RETENTION_HOURS=1 | |
- KAFKA_MESSAGE_MAX_BYTES=10000000 | |
- KAFKA_REPLICA_FETCH_MAX_BYTES=10000000 | |
- KAFKA_GROUP_MAX_SESSION_TIMEOUT_MS=60000 | |
- KAFKA_NUM_PARTITIONS=2 | |
- KAFKA_DELETE_RETENTION_MS=1000 | |
ports: | |
- "9092:9092" | |
- "9093:9093" | |
network_mode: "host" | |
kafka-manager: | |
platform: linux/amd64 | |
container_name: kafka-manager | |
image: hlebalbau/kafka-manager:1.3.3.16 | |
restart: on-failure | |
depends_on: | |
- kafka | |
- zookeeper | |
command: -Dconfig.file=/kafka-manager/conf/application.conf -Dapplication.home=/kafkamanager | |
environment: | |
- ZK_HOSTS=${DOCKER_KAFKA_HOST} | |
- APPLICATION_SECRET=letmein | |
ports: | |
- "9000:9000" | |
network_mode: "host" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment