services: kafka: image: confluentinc/cp-kafka:${CONFLUENT_VERSION:-7.5.1} environment: - KAFKA_BROKER_ID=0 - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 - KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1 - KAFKA_NUM_PARTITIONS=3 - CONFLUENT_SUPPORT_METRICS_ENABLE=0 ports: ["9092:9092"] links: [zookeeper] zookeeper: image: confluentinc/cp-zookeeper:${CONFLUENT_VERSION:-7.5.1} environment: - ZOOKEEPER_CLIENT_PORT=2181 ports: ["2181:2181"]