github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/docker_compose_versions/docker-compose-011.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:0.11.0-1-r1 15 restart: on-failure:3 16 links: 17 - zookeeper 18 ports: 19 - 9092:9092 20 - 9093:9093 21 environment: 22 KAFKA_BROKER_ID: 1 23 KAFKA_DELETE_TOPIC_ENABLE: 'true' 24 KAFKA_ADVERTISED_HOST_NAME: 'localhost' 25 KAFKA_ADVERTISED_PORT: '9092' 26 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 27 KAFKA_LISTENERS: 'PLAINTEXT://:9092,SASL_PLAINTEXT://:9093' 28 KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092,SASL_PLAINTEXT://localhost:9093' 29 KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true' 30 KAFKA_OPTS: "-Djava.security.auth.login.config=/opt/bitnami/kafka/config/kafka_server_jaas.conf" 31 ALLOW_PLAINTEXT_LISTENER: "yes" 32 entrypoint: 33 - "/bin/bash" 34 - "-c" 35 # 0.11.0 image is not honoring some configs required in server.properties 36 - echo -e '\nsasl.enabled.mechanisms=PLAIN,SCRAM-SHA-256,SCRAM-SHA-512\nmessage.max.bytes=200000000\nauto.create.topics.enable=true\nport=9092' >> /opt/bitnami/kafka/config/server.properties; 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_server_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 /app-entrypoint.sh /run.sh