-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka-flink.docker-compose.yml
76 lines (75 loc) · 1.77 KB
/
kafka-flink.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
networks:
flink-cluster:
driver: bridge
version: '3'
services:
#
# Apache Flink
#
jobmanager:
image: flink-kafka:latest
build:
context: .
dockerfile: flink-kafka.Dockerfile
ports:
- 8081:8081
command: jobmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
networks:
- flink-cluster
depends_on:
- zookeeper
volumes:
- ./src/flink_kafka:/opt/src/
taskmanager:
image: flink-kafka:latest
build:
context: .
dockerfile: flink-kafka.Dockerfile
depends_on:
- jobmanager
command: taskmanager
scale: 1
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
networks:
- flink-cluster
#
# Apache Kafka
#
zookeeper:
image: bitnami/zookeeper:3.6.4
ports:
- "2181:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
networks:
- flink-cluster
broker:
hostname: broker
container_name: broker
image: bitnami/kafka:3.1.2
ports:
- 9092:9092
- 9101:9101
- 29092:29092
environment:
KAFKA_BROKER_ID: 1
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
depends_on:
- zookeeper
networks:
- flink-cluster