加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yaml 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
单纯的老妖 提交于 2021-04-01 16:18 . 首次上传
version: "2.1"
services:
### Zookeeper ###
zoo1:
image: zookeeper:3.4.9
restart: unless-stopped
hostname: zoo1
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zoo1:2888:3888
# volumes:
# - ./persistent_volumes/zoo1/data:/data
# - ./persistent_volumes/zoo1/datalog:/datalog
### Kafka ###
kafka1:
image: confluentinc/cp-kafka:5.0.0
hostname: kafka1
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
# volumes:
# - ./persistent_volumes/kafka1/data:/var/lib/kafka/data
depends_on:
- zoo1
### Schema Registry ###
schema-registry:
image: confluentinc/cp-schema-registry:5.2.1
hostname: schema-registry
ports:
- "18081:18081"
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:18081,http://schema-registry:28081
depends_on:
- zoo1
- kafka1
### Schema Registry UI ###
schema-registry-ui:
image: landoop/schema-registry-ui:0.9.4
hostname: schema-registry-ui
ports:
- "8001:8000"
environment:
SCHEMAREGISTRY_URL: http://schema-registry:28081/
PROXY: "true"
depends_on:
- schema-registry
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化