-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (98 loc) · 3.18 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
101
102
103
104
105
106
107
108
109
version: "3.0"
services:
worker:
image: tlberglund/kafka-workshop-worker
environment:
KAFKA_BOOTSTRAP_SERVERS: kafka1:9092
depends_on:
- kafka1
command: "bash -c 'sleep infinity'"
volumes:
- $PWD/worker/data:/data
ksql-cli:
image: confluentinc/cp-ksql-cli:5.1.2
depends_on:
- ksql-server
ksql-server:
image: confluentinc/cp-ksql-server:5.1.2
ports:
- 8088:8088
depends_on:
- kafka1
- zookeeper
- schemaregistry
environment:
KSQL_BOOTSTRAP_SERVERS: kafka1:9092
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_KSQL_SERVICE_ID: kafka_workshop
KSQL_CUB_KAFKA_TIMEOUT: 300
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schemaregistry:8085
KSQL_KSQL_COMMIT_INTERVAL_MS: 2000
KSQL_KSQL_CACHE_MAX_BYTES_BUFFERING: 10000000
KSQL_KSQL_STREAMS_AUTO_OFFSET_RESET: earliest
zookeeper:
image: confluentinc/cp-zookeeper:5.1.2
restart: always
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: "2181"
ZOOKEEPER_TICK_TIME: "2000"
ZOOKEEPER_SERVERS: "zookeeper:22888:23888"
ports:
- "2181:2181"
kafka1:
image: confluentinc/cp-enterprise-kafka:5.1.2
depends_on:
- zookeeper
ports:
# Exposes 29092 for external connections to the broker
# Use kafka1:9092 for connections internal on the docker network
# See https://rmoff.net/2018/08/02/kafka-listeners-explained/ for details
- "29092:29092"
environment:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_BROKER_ID: 1
KAFKA_BROKER_RACK: "r1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_SCHEMA_REGISTRY_URL: "schemaregistry:8085"
#KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
KAFKA_JMX_PORT: 9991
schemaregistry:
image: confluentinc/cp-schema-registry:5.1.2
restart: always
depends_on:
- zookeeper
environment:
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: "zookeeper:2181"
SCHEMA_REGISTRY_HOST_NAME: schemaregistry
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8085"
SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_METHODS: "GET,POST,PUT,OPTIONS"
SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_ORIGIN: "*"
ports:
- 8085:8085
restproxy:
image: confluentinc/cp-kafka-rest:5.1.2
restart: always
depends_on:
- kafka1
environment:
KAFKA_REST_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_REST_LISTENERS: "http://0.0.0.0:8082"
KAFKA_REST_SCHEMA_REGISTRY_URL: "http://schemaregistry:8085"
KAFKA_REST_HOST_NAME: restproxy
KAFKA_REST_DEBUG: "true"
ports:
- 8082:8082
schema-registry-ui:
image: hausgold/schema-registry-ui
network_mode: bridge
environment:
# Mind the .local suffix
MDNS_HOSTNAME: schema-registry-ui.local
# Defaults to http://schema-registry.local
SCHEMAREGISTRY_URL: http://localhost:8085