docker-compose.kafka.yml 506 B

123456789101112131415161718192021222324
  1. version: '3'
  2. services:
  3. zookeeper:
  4. image: confluentinc/cp-zookeeper:latest
  5. environment:
  6. ZOOKEEPER_CLIENT_PORT: 2181
  7. ZOOKEEPER_TICK_TIME: 2000
  8. broker:
  9. image: confluentinc/cp-kafka:latest
  10. depends_on:
  11. - zookeeper
  12. environment:
  13. KAFKA_BROKER_ID: 1
  14. KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
  15. KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092
  16. KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
  17. networks:
  18. default:
  19. external:
  20. name: kafka-network