#
# 开源代码，仅供学习和交流研究使用，商用请联系三丙
# 微信：mohan_88888
# 抖音：程序员三丙
# 付费课程：https://www.bilibili.com/cheese/play/ss942400790
#

networks:
  sanbing-network:
    driver: bridge
    name: sanbing-network
    ipam:
      config:
        - subnet: 10.10.0.0/24

services:
  zookeeper:
    container_name: zookeeper
    image: registry.cn-hangzhou.aliyuncs.com/sanbing/zookeeper:3.9
    restart: always
    networks:
      - sanbing-network
    ports:
      - "2181:2181"
    environment:
      ALLOW_ANONYMOUS_LOGIN: true
  kafka:
    container_name: kafka
    image: registry.cn-hangzhou.aliyuncs.com/sanbing/kafka:3.7.1
    restart: always
    depends_on:
      - zookeeper
    networks:
      - sanbing-network
    ports:
      - "9092:9092"
    env_file:
      - kafka.env
  kafka-exporter:
    container_name: kafka-exporter
    image: registry.cn-hangzhou.aliyuncs.com/sanbing/kafka-exporter:latest
    restart: always
    depends_on:
      - kafka
    networks:
      - sanbing-network
    ports:
      - "9308:9308"
    command:
      - '--kafka.server=kafka:9092'
  kafka-ui:
    container_name: kafka-ui
    image: registry.cn-hangzhou.aliyuncs.com/sanbing/kafka-ui:v0.7.2
    restart: always
    depends_on:
      - kafka
    networks:
      - sanbing-network
    ports:
      - "9098:8080"
    environment:
      DYNAMIC_CONFIG_ENABLED: 'true'
      KAFKA_CLUSTERS_0_NAME: local
      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092

