forked from uncleguanghui/pyflink_learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
161 lines (161 loc) · 4.63 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: "3.5"
services:
zookeeper:
image: zookeeper:3.6.2
ports:
- "2181:2181" ## 对外暴露的 zookeeper 端口号
container_name: zookeeper
kafka:
image: wurstmeister/kafka:2.13-2.6.0
volumes:
- /etc/localtime:/etc/localtime ## kafka 镜像和宿主机器之间时间保持一致
ports:
- "9092:9092" ## 对外暴露的 kafka 端口号
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_PORT: 9092
KAFKA_BROKER_ID: 1
KAFKA_LOG_RETENTION_HOURS: 120
KAFKA_MESSAGE_MAX_BYTES: 10000000
KAFKA_REPLICA_FETCH_MAX_BYTES: 10000000
KAFKA_GROUP_MAX_SESSION_TIMEOUT_MS: 60000
KAFKA_NUM_PARTITIONS: 3
KAFKA_DELETE_RETENTION_MS: 1000
KAFKA_CREATE_TOPICS: "stream-in:1:1,stream-out:1:1" ## 自动创建 topics
container_name: kafka
mysql1:
image: mysql:8.0.22 # 5.7 版本本地连接不上
command: [
'--default-authentication-plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci',
'--log-bin=mysql-bin',
]
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ./examples/mysql:/docker-entrypoint-initdb.d
container_name: mysql1
mysql2:
image: mysql:8.0.22 # 5.7 版本本地连接不上
command: [
'--default-authentication-plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
ports:
- 3307:3306 # 第二个数据库的端口是 3307
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ./examples/mysql:/docker-entrypoint-initdb.d
container_name: mysql2
adminer:
image: adminer
ports:
- 8080:8080
container_name: adminer
redis:
image: redis:6.0.9
ports:
- 6379:6379
command:
# 设置 redis 密码为 redis_password
redis-server --requirepass redis_password --appendonly yes
container_name: redis
# jobmanager:
# image: flink:1.11.2-scala_2.12-java8
# ports:
# - "8081:8081"
# command: jobmanager
# volumes:
# - ./examples:/opt/examples
# # network_mode: flink-network
# environment:
# FLINK_PROPERTIES: "jobmanager.rpc.address: jobmanager"
# container_name: jobmanager
# taskmanager:
# image: flink:1.11.2-scala_2.12-java8
# volumes:
# - ./examples:/opt/examples
# depends_on:
# - jobmanager
# command: taskmanager
# scale: 1
# # network_mode: flink-network
# environment:
# FLINK_PROPERTIES: "jobmanager.rpc.address: jobmanager"
# container_name: taskmanager
# kafka-manager: ## 开源的 kafka 集群管理工具,提供 web 界面
# image: sheepkiller/kafka-manager
# environment:
# ZK_HOSTS: 127.0.01:2181
# KAFKA_MANAGER_AUTH_ENABLED: "true"
# KAFKA_MANAGER_USERNAME: kafka_admin
# KAFKA_MANAGER_PASSWORD: kafka_admin
# ports:
# - "9001:9000"
# container_name: kafka-manager
# jobmanager:
# image: flink
# expose:
# - "6123"
# ports:
# - "8081:8081"
# command: jobmanager
# environment:
# - JOB_MANAGER_RPC_ADDRESS=jobmanager
# container_name: jobmanager
# taskmanager:
# image: flink
# expose:
# - "6121"
# - "6122"
# depends_on:
# - jobmanager
# command: taskmanager
# links:
# - "jobmanager:jobmanager"
# environment:
# - JOB_MANAGER_RPC_ADDRESS=jobmanager
# container_name: taskmanager
# elasticsearch:
# image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.1
# environment:
# - cluster.name=docker-cluster
# - bootstrap.memory_lock=true
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# - discovery.type=single-node
# ports:
# - "9200:9200"
# - "9300:9300"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# nofile:
# soft: 65536
# hard: 65536
# container_name: elasticsearch
# hive:
# image: bde2020/hive:latest
# depends_on:
# - jobmanager
# environment:
# FLINK_JOBMANAGER_HOST: jobmanager
# container_name: hive
# hive:
# image: ruili2/hive:latest
# depends_on:
# - jobmanager
# environment:
# FLINK_JOBMANAGER_HOST: jobmanager
# container_name: hive
# networks:
# flink-network:
# name: flink-network