version: '3.5'

services:
  zookeeper:
	image: zookeeper
	ports: 
	  - "2181:2181"   
  kafka:
	image: wurstmeister/kafka 
	ports:
	  - "9092:9092"
	environment:
	 # HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
	  KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
	  KAFKA_ADVERTISED_HOST_NAME: kafka
	  KAFKA_ADVERTISED_PORT: 9092
	  KAFKA_BROKER_ID: 1
	  KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
	  KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka -Dcom.sun.management.jmxremote.rmi.port=1099"
	  JMX_PORT: 1099      
	volumes:
	  - /var/run/docker.sock:/var/run/docker.sock   
	depends_on:
	  - zookeeper      
  kafka-manager:
	image: kafkamanager/kafka-manager
	ports:
	  - "9000:9000"
	links:
	  - zookeeper
	  - kafka  
	environment:
	  ZK_HOSTS: zookeeper:2181