0
13693261870
8 天以前 90d0adc97709d9116c8a897dcd681ef44be735f5
docker/kafka.yml
@@ -3,6 +3,7 @@
  # zookeeper
  zookeeper:
    image: zookeeper:3.4
    #hostname: zookeeper34
    ports:
      - 2181:2181
      - 2888:2888
@@ -17,7 +18,8 @@
      # ZOO_SERVER_PASSWORDS: kaFka_12#$56
    healthcheck:
      test: ["CMD-SHELL", "zkServer.sh status"]
      interval: 5s
      #test: ["CMD-SHELL", "echo stat | nc localhost 2181 | grep Mode"]
      interval: 10s
      timeout: 2s
      retries: 3
    networks:
@@ -42,6 +44,11 @@
      KAFKA_CLIENT_PASSWORDS: kaFka_12#$56
      # KAFKA_ZOOKEEPER_USER: admin
      # KAFKA_ZOOKEEPER_PASSWORD: kaFka_12#$56
    healthcheck:
      test: ["CMD", "kafka-broker-api-versions", "--bootstrap-server", "localhost:9092"]
      interval: 10s
      timeout: 2s
      retries: 3
    volumes:
      # chmod -R 777 kafka_data/
      - ./kafka_data:/bitnami/kafka