version: '3.8' services: kafka: image: 'bitnami/kafka:latest' environment: - KAFKA_BROKER_ID=1 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_LISTENERS=INSIDE://:9092,OUTSIDE://:29092 - KAFKA_ADVERTISED_LISTENERS=INSIDE://kafka:9092,OUTSIDE://localhost:29092 - KAFKA_INTER_BROKER_LISTENER_NAME=INSIDE - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 depends_on: - zookeeper zookeeper: image: 'bitnami/zookeeper:latest' environment: - ALLOW_ANONYMOUS_LOGIN=yes producer: build: context: . dockerfile: producer.Dockerfile environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 depends_on: - kafka consumer: build: context: . dockerfile: consumer.Dockerfile environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 depends_on: - kafka processor: build: context: . dockerfile: processor.Dockerfile environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 depends_on: - kafka