-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
98 lines (92 loc) · 2.85 KB
/
docker-compose.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
87
88
89
90
91
92
93
94
95
96
97
98
networks:
kafka:
name: kafka
driver: bridge
services:
zookeeper:
image: confluentinc/cp-zookeeper
container_name: zookeeper
restart: unless-stopped
networks:
- kafka
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_ADMIN_ENABLE_SERVER: false
kafka:
image: confluentinc/cp-kafka
container_name: kafka
restart: unless-stopped
depends_on:
- zookeeper
networks:
- kafka
ports:
- "9092:9092"
expose:
- "9093"
environment:
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_NUM_PARTITIONS: 12
KAFKA_COMPRESSION_TYPE: gzip
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9093,EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_LISTENERS: INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: '9091'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.authorizer.AclAuthorizer'
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
initialize-topics:
image: confluentinc/cp-kafka
container_name: initialize-topics
networks:
- kafka
depends_on:
- kafka
command:
- bash
- -c
- |
kafka-topics --bootstrap-server kafka:9093 --create --if-not-exists --topic topic-account-created --partitions 2 --replication-factor 1
kafka-topics --bootstrap-server kafka:9093 --create --if-not-exists --topic topic-movement-applied --partitions 2 --replication-factor 1
kafka-topics --bootstrap-server kafka:9093 --create --if-not-exists --topic topic-balance-updated --partitions 2 --replication-factor 1
schema-registry:
image: confluentinc/cp-schema-registry
container_name: schema-registry
restart: unless-stopped
depends_on:
- kafka
networks:
- kafka
ports:
- "8085:8085"
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:9093'
SCHEMA_REGISTRY_HOST_NAME: 'schema-registry'
SCHEMA_REGISTRY_LISTENERS: 'http://0.0.0.0:8085'
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: 'INFO'
akhq:
image: tchiotludo/akhq
container_name: akhq
restart: unless-stopped
depends_on:
- kafka
- schema-registry
networks:
- kafka
ports:
- "8090:8080"
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:9093"
schema-registry:
url: "http://schema-registry:8085"