github.com/hoveychen/kafka-go@v0.4.42/examples/docker-compose.yaml (about) 1 version: '2.3' 2 services: 3 4 zookeeper: 5 hostname: zookeeper 6 image: wurstmeister/zookeeper:3.4.6 7 expose: 8 - "2181" 9 ports: 10 - "2181:2181" 11 12 kafka: 13 image: wurstmeister/kafka 14 env_file: 15 - kafka/kafka-variables.env 16 depends_on: 17 - zookeeper 18 ports: 19 - '9092:9092' 20 - '8082:8082' 21 - '8083:8083' 22 23 mongo-db: 24 image: mongo:4.0 25 expose: 26 - "27017" 27 ports: 28 - "27017:27017" 29 environment: 30 MONGO_DATA_DIR: /data/db 31 MONGO_LOG_DIR: /dev/null 32 33 consumer-mongo-db: 34 build: 35 context: consumer-mongo-db 36 environment: 37 mongoURL: mongodb://mongo-db:27017 38 dbName: example_db 39 collectionName: example_coll 40 kafkaURL: kafka:9092 41 topic: topic1 42 GroupID: mongo-group 43 depends_on: 44 - kafka 45 - mongo-db 46 47 consumer-logger: 48 build: 49 context: consumer-logger 50 environment: 51 kafkaURL: kafka:9092 52 topic: topic1 53 GroupID: logger-group 54 depends_on: 55 - kafka 56 57 producer-random: 58 build: 59 context: producer-random 60 environment: 61 kafkaURL: kafka:9092 62 topic: topic1 63 depends_on: 64 - kafka 65 66 producer-api: 67 build: 68 context: producer-api 69 environment: 70 kafkaURL: kafka:9092 71 topic: topic1 72 expose: 73 - "8080" 74 ports: 75 - "8080:8080" 76 depends_on: 77 - kafka