-
Notifications
You must be signed in to change notification settings - Fork 0
/
kraft-kouncil.yaml
86 lines (84 loc) · 3.55 KB
/
kraft-kouncil.yaml
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
80
81
82
83
84
85
86
#
# Created by MikBac on 11.12.2022
#
# Docs:
# * https://docs.confluent.io/platform/current/installation/configuration/broker-configs.html
# * https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md
version: "3.4"
services:
kafka-bitnami:
image: 'bitnami/kafka:3.7.0'
hostname: bitnami-kafka
restart: unless-stopped
ports:
- '9192:9092'
volumes:
- kafka-storage:/bitnami/kafka
environment:
# Enable KRaft mode (instead of Zookeeper mode).
- KAFKA_ENABLE_KRAFT=yes
# Comma-separated list of Kafka KRaft roles. Allowed values: "controller,broker", "controller", "broker".
- KAFKA_CFG_PROCESS_ROLES=broker,controller
# Name of internal listener. An internal broker used for communication between brokers.
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=INTERNAL
# Name of controller listener.
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
# List of Kafka listeners. If node is set with controller role, the listener CONTROLLER must be included.
- KAFKA_CFG_LISTENERS=EXTERNAL://:9092,CONTROLLER://:9093,INTERNAL://:9094
# Maps each listener with Apache Kafka security protocol. Allowed values: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,INTERNAL:PLAINTEXT
# Address map for external connection to Kafka.
# E.g. EXTERNAL is the external address and INTERNAL is the address available inside the docker network.
- KAFKA_CFG_ADVERTISED_LISTENERS=EXTERNAL://localhost:9192,INTERNAL://bitnami-kafka:9094
# Unique id for the Kafka node. It has to be an integer.
- KAFKA_CFG_NODE_ID=1
# Comma separated host:port pairs, each corresponding to a Kafka controller connection.
# Pattern: <controller1_node_id>@<controller1_host>:9093
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@bitnami-kafka:9093
# Log retention policy (e.g. 48 is 2 days retention).
# Available log retentions policies:
# * KAFKA_CFG_LOG_RETENTION_HOURS
# * KAFKA_CFG_LOG_RETENTION_CHECK_INTERVAL_MS
# * KAFKA_CFG_LOG_RETENTION_BYTES
- KAFKA_CFG_LOG_RETENTION_HOURS=48
# Default replication factors for automatically created topics.
- KAFKA_CFG_DEFAULT_REPLICATION_FACTOR=1
# The replication factor for the offsets topic (set higher to ensure availability).
- KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR=1
# The replication factor for the transaction topic (set higher to ensure availability).
- KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
# Automatically creates a topic when subscribing or assigning a non-existent topic.
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
# Rack of the broker. This will be used in rack aware replication assignment for fault tolerance.
# E.g. RACK1, us-east-1d
# The Rack Awareness feature in Kafka spreads replicas of the same partition across different racks
# to minimize data loss in the event of a rack failure.
- KAFKA_CFG_BROKER_RACK=zone-test
deploy:
resources:
limits:
cpus: "1"
memory: 1g
networks:
- kafka-network
kouncil-ui:
image: 'consdata/kouncil:1.7'
restart: unless-stopped
ports:
- '9080:8080'
environment:
- bootstrapServers=bitnami-kafka:9094
deploy:
resources:
limits:
cpus: "1"
memory: 512M
networks:
- kafka-network
depends_on:
- kafka-bitnami
volumes:
kafka-storage:
driver: local
networks:
kafka-network: