github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/docker_compose_versions/docker-compose-260.yml (about) 1 # See https://hub.docker.com/r/bitnami/kafka/tags for the complete list. 2 version: '3' 3 services: 4 zookeeper: 5 container_name: zookeeper 6 hostname: zookeeper 7 image: bitnami/zookeeper:latest 8 ports: 9 - 2181:2181 10 environment: 11 ALLOW_ANONYMOUS_LOGIN: yes 12 kafka: 13 container_name: kafka 14 image: bitnami/kafka:2.6.0 15 restart: on-failure:3 16 links: 17 - zookeeper 18 ports: 19 - 9092:9092 20 - 9093:9093 21 environment: 22 KAFKA_CFG_BROKER_ID: 1 23 KAFKA_CFG_DELETE_TOPIC_ENABLE: 'true' 24 KAFKA_CFG_ADVERTISED_HOST_NAME: 'localhost' 25 KAFKA_CFG_ADVERTISED_PORT: '9092' 26 KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 27 KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true' 28 KAFKA_CFG_MESSAGE_MAX_BYTES: '200000000' 29 KAFKA_CFG_LISTENERS: 'PLAINTEXT://:9092,SASL_PLAINTEXT://:9093' 30 KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092,SASL_PLAINTEXT://localhost:9093' 31 KAFKA_CFG_SASL_ENABLED_MECHANISMS: 'PLAIN,SCRAM-SHA-256,SCRAM-SHA-512' 32 KAFKA_CFG_AUTHORIZER_CLASS_NAME: 'kafka.security.auth.SimpleAclAuthorizer' 33 KAFKA_CFG_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true' 34 KAFKA_OPTS: "-Djava.security.auth.login.config=/opt/bitnami/kafka/config/kafka_jaas.conf" 35 ALLOW_PLAINTEXT_LISTENER: yes 36 entrypoint: 37 - "/bin/bash" 38 - "-c" 39 - echo -e 'KafkaServer {\norg.apache.kafka.common.security.scram.ScramLoginModule required\n username="adminscram"\n password="admin-secret";\n org.apache.kafka.common.security.plain.PlainLoginModule required\n username="adminplain"\n password="admin-secret"\n user_adminplain="admin-secret";\n };' > /opt/bitnami/kafka/config/kafka_jaas.conf; /opt/bitnami/kafka/bin/kafka-configs.sh --zookeeper zookeeper:2181 --alter --add-config "SCRAM-SHA-256=[password=admin-secret-256],SCRAM-SHA-512=[password=admin-secret-512]" --entity-type users --entity-name adminscram; exec /entrypoint.sh /run.sh