Merge branch 'rebalance-listener' into stored-state
[demos/kafka/training] / docker-compose.yml
1 version: '3.2'
2 services:
3   zookeeper:
4     image: confluentinc/cp-zookeeper:7.0.2
5     environment:
6       ZOOKEEPER_CLIENT_PORT: 2181
7     ports:
8       - 2181:2181
9
10   kafka:
11     image: confluentinc/cp-kafka:7.0.2
12     environment:
13       KAFKA_BROKER_ID: 1
14       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
15       KAFKA_LISTENERS: DOCKER://:9092, LOCALHOST://:9082
16       KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka:9092, LOCALHOST://localhost:9082
17       KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
18       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
19       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
20       KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
21     ports:
22       - 9092:9082
23       - 9082:9082
24     depends_on:
25       - zookeeper
26
27   mongo:
28     image: mongo:4.4
29     ports:
30       - 27017:27017
31     environment:
32       MONGO_INITDB_ROOT_USERNAME: juplo
33       MONGO_INITDB_ROOT_PASSWORD: training
34
35   kafka-ui:
36     image: provectuslabs/kafka-ui:0.3.3
37     ports:
38       - 8080:8080
39     environment:
40       KAFKA_CLUSTERS_0_NAME: local
41       KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
42
43   cli:
44     image: juplo/toolbox
45     command: sleep infinity
46
47   producer:
48     image: juplo/endless-producer:1.0-SNAPSHOT
49     ports:
50       - 8000:8080
51     environment:
52       producer.bootstrap-server: kafka:9092
53       producer.client-id: producer
54       producer.topic: test
55       producer.throttle-ms: 10
56
57
58   consumer:
59     image: juplo/endless-consumer:1.0-SNAPSHOT
60     ports:
61       - 8081:8081
62     environment:
63       consumer.bootstrap-server: kafka:9092
64       consumer.client-id: consumer
65       consumer.topic: test
66       spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017
67       spring.data.mongodb.database: juplo