docker-compose kafka


version: "3"

services:
  zookeeper:
    image: "wurstmeister/zookeeper"
    container_name: "kafka-zookeeper"
    restart: always
    ports:
      - 2181:2181

  kafka:
    image: "wurstmeister/kafka"
    container_name: "kafka-learn"
    ports:
      - 9092:9092
    environment:
      KAFKA_ADVERTISED_HOST_NAME: 192.168.19.138
      KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
      KAFKA_BROKER_ID: 1
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
    volumes:
      - /data/kafka-learn:/kafka
    depends_on:
      - zookeeper

打赏

免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2022 CODEPRJ.COM