-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (88 loc) · 1.98 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
version: "3.7"
services:
postgres:
image: postgres:10
container_name: postgres
ports:
- "5000:5432"
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: db_user
POSTGRES_PASSWORD: db_password
volumes:
- ./postgres-data:/var/lib/postgresql/data
zookeeper:
build:
context: ./zookeeper
container_name: zookeeper
expose:
- 2181
- 2888
- 3888
broker1:
build:
context: ./kafka
container_name: broker1
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENERS: "PLAINTEXT://broker1:9092"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://broker1:9092"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
broker2:
build:
context: ./kafka
container_name: broker2
ports:
- "9093:9093"
depends_on:
- zookeeper
- broker1
environment:
KAFKA_BROKER_ID: 2
KAFKA_LISTENERS: "PLAINTEXT://broker2:9093"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://broker2:9093"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
schema:
build:
context: ./schema-registry
container_name: schema
expose:
- 8081
environment:
SCHEMA_BROKERS: "PLAINTEXT://broker1:9092,PLAINTEXT://broker2:9093"
SCHEMA_LISTENERS: "http://schema:8081"
depends_on:
- broker1
- broker2
connector:
build:
context: ./connector
container_name: connector
depends_on:
- broker1
- broker2
ports:
- 8083:8083
ksql:
build:
context: ./ksql
container_name: ksql
expose:
- 8088
environment:
KSQL_BROKERS: "broker1:9092,broker2:9093"
KSQL_LISTENERS: "http://ksql:8088,http://localhost:8088"
KSQL_SCHEMA_REGISTRY: "http://schema:8081"
KSQL_CONNECT_URL: "http://connector:8083"
depends_on:
- broker1
- broker2
- schema
- connector
networks:
default:
name: kafkaCDC