-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
138 lines (135 loc) · 3.56 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: "3.5"
services:
jobmanager:
image: building-pyflink-apps:1.17.1
command: jobmanager
container_name: jobmanager
ports:
- "8081:8081"
networks:
- appnet
environment:
- BOOTSTRAP_SERVERS=kafka-0:9092
- RUNTIME_ENV=docker
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
state.backend: filesystem
state.checkpoints.dir: file:///tmp/flink-checkpoints
state.savepoints.dir: file:///tmp/flink-savepoints
heartbeat.interval: 1000
heartbeat.timeout: 5000
rest.flamegraph.enabled: true
web.backpressure.refresh-interval: 10000
volumes:
- ./src:/tmp/src
taskmanager-0:
image: building-pyflink-apps:1.17.1
command: taskmanager
container_name: taskmanager-0
networks:
- appnet
volumes:
- flink_data_0:/tmp/
- ./src:/tmp/src
environment:
- BOOTSTRAP_SERVERS=kafka-0:9092
- RUNTIME_ENV=docker
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 5
state.backend: filesystem
state.checkpoints.dir: file:///tmp/flink-checkpoints
state.savepoints.dir: file:///tmp/flink-savepoints
heartbeat.interval: 1000
heartbeat.timeout: 5000
depends_on:
- jobmanager
taskmanager-1:
image: building-pyflink-apps:1.17.1
command: taskmanager
container_name: taskmanager-1
networks:
- appnet
volumes:
- flink_data_1:/tmp/
- ./src:/tmp/src
environment:
- BOOTSTRAP_SERVERS=kafka-0:9092
- RUNTIME_ENV=docker
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 5
state.backend: filesystem
state.checkpoints.dir: file:///tmp/flink-checkpoints
state.savepoints.dir: file:///tmp/flink-savepoints
heartbeat.interval: 1000
heartbeat.timeout: 5000
depends_on:
- jobmanager
zookeeper:
image: bitnami/zookeeper:3.5
container_name: zookeeper
ports:
- "2181"
networks:
- appnet
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeper_data:/bitnami/zookeeper
kafka-0:
image: bitnami/kafka:2.8.1
container_name: kafka-0
expose:
- 9092
ports:
- "29092:29092"
networks:
- appnet
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_BROKER_ID=0
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=INTERNAL://:9092,EXTERNAL://:29092
- KAFKA_CFG_ADVERTISED_LISTENERS=INTERNAL://kafka-0:9092,EXTERNAL://localhost:29092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=INTERNAL
- KAFKA_CFG_NUM_PARTITIONS=5
- KAFKA_CFG_DEFAULT_REPLICATION_FACTOR=1
volumes:
- kafka_0_data:/bitnami/kafka
depends_on:
- zookeeper
kafka-ui:
image: provectuslabs/kafka-ui:master
container_name: kafka-ui
ports:
- "8080:8080"
networks:
- appnet
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka-0:9092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
depends_on:
- zookeeper
- kafka-0
networks:
appnet:
name: app-network
volumes:
flink_data_0:
driver: local
name: flink_data_0
flink_data_1:
driver: local
name: flink_data_1
zookeeper_data:
driver: local
name: zookeeper_data
kafka_0_data:
driver: local
name: kafka_0_data