-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (94 loc) · 2.83 KB
/
docker-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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '3.8'
services:
postgres:
image: quay.io/debezium/postgres:16
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
POSTGRES_DB: xkcd_data_hub
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
kafka:
image: bitnami/kafka:latest
hostname: kafka
container_name: kafka
ports:
- "9092:9092"
- "9094:9094"
- "9101:9101"
volumes:
- "kafka_data:/bitnami"
environment:
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_ENABLE_KRAFT: yes
KAFKA_BROKER_ID: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: true
KAFKA_CFG_NODE_ID: 1
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_CFG_JMX_PORT: 9101
KAFKA_CFG_HOST_NAME: kafka
KAFKA_CFG_PROCESS_ROLES: broker,controller
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
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://kafka:9092,EXTERNAL://kafka:9094
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_CFG_NUM_PARTITIONS: 2
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
ports:
- "8080:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: PLAINTEXT
KAFKA_CLUSTERS_0_READONLY: "false"
depends_on:
- kafka
schema-registry:
image: confluentinc/cp-schema-registry:latest
hostname: schema-registry
container_name: schema-registry
depends_on:
- kafka
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:9092
connect:
image: quay.io/debezium/connect:2.7
container_name: debezium-connect
volumes:
- ./lib:/kafka/connect/kafka-connect-protobuf-converter-7.5.0
ports:
- "8083:8083"
depends_on:
- kafka
- postgres
links:
- kafka
- postgres
environment:
BOOTSTRAP_SERVERS: 'kafka:9092'
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: 'kafka_connect_config_storage'
OFFSET_STORAGE_TOPIC: 'kafka_connect_offset_storage'
STATUS_STORAGE_TOPIC: 'kafka_connect_status_storage'
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8083/connectors || exit 1"]
interval: 30s
timeout: 10s
retries: 5
volumes:
postgres_data:
driver: local
kafka_data:
driver: local