-
Notifications
You must be signed in to change notification settings - Fork 103
/
docker-compose.yml
53 lines (49 loc) · 1.57 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
version: '3.8'
services:
kafka: # https://hub.docker.com/r/confluentinc/cp-kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: 'zooKeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zooKeeper
image: 'confluentinc/cp-kafka:5.5.3'
ports:
- '9092:9092'
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "9092"]
interval: 1s
timeout: 60s
retries: 60
zooKeeper: # https://hub.docker.com/r/confluentinc/cp-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: '2181'
image: 'confluentinc/cp-zookeeper:5.2.2'
ports:
- '2181:2181'
healthcheck:
test: echo ruok | nc 127.0.0.1 2181 || exit 1
interval: 2s
timeout: 5s
retries: 20
schemaRegistry: # https://hub.docker.com/r/confluentinc/cp-schema-registry
environment:
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zooKeeper:2181'
SCHEMA_REGISTRY_HOST_NAME: localhost
image: 'confluentinc/cp-schema-registry:5.5.3'
ports:
- '8982:8081'
depends_on:
- kafka
healthcheck:
test: "curl --output /dev/null --silent --head --fail http://localhost:8081/subjects"
interval: 30s
timeout: 10s
retries: 10
avro_tools: # https://hub.docker.com/r/kpnnl/avro-tools
image: kpnnl/avro-tools:1.12.0
ports:
- '9999:9999'