# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

services:
  zookeeper:
    image: docker.io/bitnami/zookeeper:3.9
    ports:
      - '2181'
    volumes:
      - zookeeper_data:/bitnami
    environment:
      - ZOO_SERVER_ID=1
      - ALLOW_ANONYMOUS_LOGIN=yes
      - ZOO_SERVERS=zookeeper:2888:3888,zookeeper2:2888:3888,zookeeper3:2888:3888
  zookeeper2:
    image: docker.io/bitnami/zookeeper:3.9
    ports:
      - '2181'
    volumes:
      - zookeeper2_data:/bitnami
    environment:
      - ZOO_SERVER_ID=2
      - ALLOW_ANONYMOUS_LOGIN=yes
      - ZOO_SERVERS=zookeeper:2888:3888,zookeeper2:2888:3888,zookeeper3:2888:3888
  zookeeper3:
    image: docker.io/bitnami/zookeeper:3.9
    ports:
      - '2181'
    volumes:
      - zookeeper3_data:/bitnami
    environment:
      - ZOO_SERVER_ID=3
      - ALLOW_ANONYMOUS_LOGIN=yes
      - ZOO_SERVERS=zookeeper:2888:3888,zookeeper2:2888:3888,zookeeper3:2888:3888

volumes:
  zookeeper_data:
    driver: local
  zookeeper2_data:
    driver: local
  zookeeper3_data:
    driver: local
