asp.net docker-compose添加kafka和redis和zookeeper

docker-compose.yml添加

  redis:
    image: redis:alpine

  kafka:
    image: "bitnami/kafka:3.1.1"
    depends_on:
     - zookeeper

  zookeeper:
    image: "bitnami/zookeeper:3.5.10"

docker-compose.override.yml添加

  redis:
    ports:
      - "6379"

  kafka:
    links: 
     - zookeeper
    environment:
     - KAFKA_BROKER_ID=1
     - KAFKA_LISTENERS=PLAINTEXT://:9380
     - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9380
     - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
     - ALLOW_PLAINTEXT_LISTENER=yes
    ports:
     - "9380"
    depends_on:
     - zookeeper

  zookeeper:
    environment:
    - ALLOW_ANONYMOUS_LOGIN=yes
    ports:
      - "2181"

添加了redis和kafka和zookeeper

你可能感兴趣的:(docker,kafka,redis)