-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdocker-compose.yml
113 lines (112 loc) · 3.11 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
# 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'
services:
#postgres container
postgres:
image: postgres:13
ports:
- 5433:5432
container_name: postgres
environment:
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: pgdb
volumes:
- postgres-vol:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres_user"]
interval: 5s
retries: 5
restart: always
#mongodb container
mongodb:
image: mongo
container_name: mongodb
environment:
PUID: 1000
PGID: 1000
volumes:
- mongo-vol:/data/db
ports:
- 27017:27017
restart: always
healthcheck:
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 3s
retries: 5
#zookeeper-container
zookeeper:
image: bitnami/zookeeper:latest
container_name: zookeeper
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
#kafka-container
kafka:
image: bitnami/kafka:latest
ports:
- 9092:9092
container_name: kafka
environment:
KAFKA_BROKER_ID: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_LISTENERS: CLIENT://:9092,EXTERNAL://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: CLIENT://kafka:9092,EXTERNAL://localhost:9093
KAFKA_INTER_BROKER_LISTENER_NAME: CLIENT
depends_on:
- zookeeper
healthcheck:
test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"]
interval: 30s
timeout: 10s
retries: 4
#hive metastore
hive-metastore:
image: spearframework/hive-metastore:2.1.1_v1.0
restart: always
hostname: metastore.hive
container_name: hive-metastore
environment:
POSTGRES_PASSWORD: hive
#spear-container
spear:
image: spearframework/spark-hadoop-hive:2.4.7_v1.0
container_name: spear
hostname: hadoop.spark
restart: always
ports:
- "4040:4040"
- "4041:4041"
- "8089:8088"
- "8090:18080"
expose:
- "22"
depends_on:
- hive-metastore
privileged: true
command: "/usr/sbin/init"
healthcheck:
test: ["CMD-SHELL", "hive -e 'select 1'"]
interval: 30s
timeout: 10s
retries: 4
volumes:
mongo-vol:
postgres-vol: