-
Notifications
You must be signed in to change notification settings - Fork 530
/
docker-compose.yml
199 lines (187 loc) · 5.21 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: '3.0'
services:
mysql:
image: mysql:8.0.28
container_name: mysql
platform: "linux/x86_64"
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=inlong
healthcheck:
test: "/usr/bin/mysql --user=root --password=inlong --execute \"SHOW DATABASES;\""
timeout: 20s
interval: 2s
retries: 10
volumes:
- ./mysql:/var/lib/mysql
- ./sql:/docker-entrypoint-initdb.d
command: --authentication_policy=mysql_native_password
pulsar:
image: apachepulsar/pulsar:2.8.2
container_name: pulsar
ports:
- "6650:6650"
- "8080:8080"
volumes:
- ./pulsar/data:/pulsar/data
command: bin/pulsar standalone
manager:
image: inlong/manager:${VERSION_TAG}
container_name: manager
depends_on:
mysql:
condition: service_healthy
ports:
- "8083:8083"
environment:
- JDBC_URL=mysql:3306
- USERNAME=root
- PASSWORD=inlong
- ZK_URL=tubemq-server:2181
- FLINK_HOST=jobmanager
- FLINK_PORT=8081
- AUDIT_QUERY_URL=http://audit:10080
dashboard:
image: inlong/dashboard:${VERSION_TAG}
container_name: dashboard
depends_on:
- manager
ports:
- "80:80"
environment:
- MANAGER_API_ADDRESS=manager:8083
dataproxy:
image: inlong/dataproxy:${VERSION_TAG}
container_name: dataproxy
depends_on:
- manager
ports:
- "46801:46801"
- "46802:46802"
environment:
- MANAGER_OPENAPI_IP=manager
- MANAGER_OPENAPI_PORT=8083
# pulsar or kafka
- MQ_TYPE=pulsar
- ETH_NAME=eth0
agent:
image: inlong/agent:${VERSION_TAG}
container_name: agent
depends_on:
- manager
- dataproxy
environment:
- MANAGER_OPENAPI_IP=manager
- MANAGER_OPENAPI_PORT=8083
- DATAPROXY_IP=dataproxy
- DATAPROXY_PORT=46801
volumes:
- ./collect-data:/data/collect-data
audit:
image: inlong/audit:${VERSION_TAG}
container_name: audit
privileged: true
depends_on:
mysql:
condition: service_healthy
environment:
- AUDIT_JDBC_URL=mysql:3306
- AUDIT_JDBC_USERNAME=root
- AUDIT_JDBC_PASSWORD=inlong
- MANAGER_OPENAPI_IP=manager
- MANAGER_OPENAPI_PORT=8083
- AUDIT_PROXY_ADDRESS=audit:10081
# pulsar or kafka
- MQ_TYPE=pulsar
ports:
- "10080:10080"
- "10081:10081"
# flink jobmanager
jobmanager:
image: apache/flink:1.15-scala_2.12
container_name: jobmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
- OTEL_EXPORTER_ENDPOINT=logcollector:4317
ports:
- "8081:8081"
command: jobmanager
# flink taskmanager
taskmanager:
image: apache/flink:1.15-scala_2.12
container_name: taskmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
- OTEL_EXPORTER_ENDPOINT=logcollector:4317
command: taskmanager
# The following services are used to collect logs for InLong-sort, not effective by default, you can enable them by add `--profile sort-report up` to the `docker-compose` command
# opentelemetry collector
logcollector:
image: otel/opentelemetry-collector-contrib:0.110.0
container_name: logcollector
volumes:
- ./log-system/otel-config.yaml:/otel-config.yaml
command: [ "--config=/otel-config.yaml"]
profiles: [sort-report]
ports:
- "4317:4317"
# grafana loki
loki:
image: grafana/loki:3.0.0
ports:
- "3100:3100"
profiles: [sort-report]
volumes:
- ./log-system/loki.yaml:/etc/loki/local-config.yaml
command: -config.file=/etc/loki/local-config.yaml
# grafana
grafana:
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
entrypoint:
- sh
- -euc
- |
mkdir -p /etc/grafana/provisioning/datasources
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
orgId: 1
url: http://loki:3100
basicAuth: false
isDefault: true
version: 1
editable: false
EOF
/run.sh
image: grafana/grafana:latest
ports:
- "3000:3000"
profiles: [sort-report]