docker-stack.yml 594 B

123456789101112131415161718192021222324252627282930
  1. version: '3.2'
  2. services:
  3. zookeeper:
  4. image: wurstmeister/zookeeper:latest
  5. deploy:
  6. replicas: 1
  7. restart_policy:
  8. condition: on-failure
  9. ports:
  10. - "2181:2181"
  11. networks:
  12. - kafka-tier
  13. kafka:
  14. image: wurstmeister/kafka:2.12-2.3.0
  15. deploy:
  16. replicas: 1
  17. restart_policy:
  18. condition: on-failure
  19. ports:
  20. - "9092:9092"
  21. networks:
  22. - kafka-tier
  23. environment:
  24. - KAFKA_ADVERTISED_HOST_NAME=[YOUR_HOST_NAME]
  25. - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
  26. - ZOOKEEPER_IP=zookeeper
  27. networks:
  28. kafka-tier: