Last active
October 18, 2023 02:48
-
-
Save Vienchau/9c266b7fc33e512bb95619e51a2eb00e to your computer and use it in GitHub Desktop.
Docker compose file for Confluent Kafka-rest: confluentinc/cp-zookeeper, confluentinc/cp-kafka, confluentinc/cp-schema-registry, confluentinc/cp-kafka-rest
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' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "32181:32181" | |
volumes: | |
- zookeeper_data:/var/lib/zookeeper/data | |
- zookeeper_log:/var/lib/zookeeper/log | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 32181 # Instructs ZooKeeper where to listen for connections by clients such as Apache Kafka | |
ZOOKEEPER_TICK_TIME: 2000 | |
ZOOKEEPER_SYNC_LIMIT: 2 | |
restart: always | |
kafka: | |
image: confluentinc/cp-kafka:latest | |
hostname: kafka | |
container_name: kafka | |
ports: | |
- "29092:29092" | |
volumes: | |
- kafka_data:/var/lib/kafka | |
depends_on: | |
- zookeeper | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181 # Instructs Kafka how to get in touch with ZooKeeper. | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
restart: always | |
schema-registry: | |
image: confluentinc/cp-schema-registry:latest | |
hostname: schema-registry | |
container_name: schema-registry | |
ports: | |
- "38081:38081" | |
volumes: | |
- "schema_registry_data:/data" | |
depends_on: | |
- kafka | |
environment: | |
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:32181 | |
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:29092 | |
SCHEMA_REGISTRY_HOST_NAME: schema-registry | |
SCHEMA_REGISTRY_LISTENERS: http://schema-registry:38081 | |
SCHEMA_REGISTRY_DEBUG: "true" | |
restart: always | |
kafka-rest: | |
image: confluentinc/cp-kafka-rest:latest | |
hostname: kafka-rest | |
container_name: kafka-rest | |
ports: | |
- "38082:38082" | |
depends_on: | |
- schema-registry | |
volumes: | |
- "kafka_rest_data:/data" | |
environment: | |
KAFKA_REST_ZOOKEEPER_CONNECT: zookeeper:32181 | |
KAFKA_REST_SCHEMA_REGISTRY_URL: schema-registry:38081 | |
KAFKA_REST_HOST_NAME: kafka-rest | |
KAFKA_REST_LISTENERS: http://kafka-rest:38082 | |
KAFKA_REST_BOOTSTRAP_SERVERS: kafka:29092 | |
restart: always | |
kowl: | |
image: quay.io/cloudhut/kowl | |
restart: on-failure | |
hostname: kowl | |
container_name: kowl | |
volumes: | |
- ./config.yaml:/etc/kowl/config.yaml | |
ports: | |
- "8081:8080" | |
entrypoint: ./kowl --config.filepath=/etc/kowl/config.yaml | |
depends_on: | |
- kafka | |
volumes: #/var/lib/docker | |
zookeeper_data: | |
driver: local | |
zookeeper_log: | |
driver: local | |
kafka_data: | |
driver: local | |
kafka_rest_data: | |
driver: local | |
schema_registry_data: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment