-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka-service-registry-compose.yml
79 lines (74 loc) · 2.31 KB
/
kafka-service-registry-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
kafka_broker:
container_name: kafka_broker
hostname: kafka_broker
image: bitnami/kafka:3.8.1
ports:
- '9092:9092'
- '9094:9094'
volumes:
- kafka_storage:/bitnami/kafka
environment:
- KAFKA_ENABLE_KRAFT=yes # use KRAFT instead of zookeeper for Quorum_lead
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092,EXTERNAL://kafka_broker:9094
- KAFKA_CFG_NODE_ID=0
- [email protected]:9093
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true # Creating topic if the topic does not exist
networks:
- kafka-network
kafka-ui:
container_name: kafka-ui
hostname: kafka-ui
# image: provectuslabs/kafka-ui:v0.7.2
image: kafbat/kafka-ui:main
depends_on:
- kafka_broker
ports:
- '8080:8080'
volumes:
- kafka_ui_storage:/etc/kafkaui
environment:
DYNAMIC_CONFIG_ENABLED: 'true'
LOGGING_LEVEL_ROOT: 'DEBUG'
KAFKA_CLUSTERS_0_NAME: kafka-cluster
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka_broker:9094
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081
networks:
- kafka-network
schema-registry:
container_name: schema-registry
# image: confluentinc/cp-schema-registry:latest
image: confluentinc/cp-schema-registry:7.7.1
hostname: schema-registry
depends_on:
- kafka_broker
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka_broker:9094
SCHEMA_REGISTRY_LISTENERS: http://schema-registry:8081,http://127.0.0.1:8081
networks:
- kafka-network
volumes:
kafka_storage:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '${PWD}/docker-volume'
kafka_ui_storage:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '${PWD}/kafka-ui-volume'
networks:
kafka-network:
name: kafka-network
driver: bridge