-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yaml
187 lines (177 loc) · 5 KB
/
docker-compose.yaml
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
version: '4.2'
volumes:
hivedb: {}
coordinatordb: {}
workerdb: {}
supersetdb: {}
services:
postgres:
image: ${REPO}postgres:9.4
container_name: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=postgres
volumes:
- hivedb:/var/lib/postgresql/data
- ./postgres/scripts:/docker-entrypoint-initdb.d/
ports:
- "5432:5432"
networks:
ntrino:
aliases:
- postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: "20s"
timeout: "20s"
retries: 3
hive:
#use this if you do not want to build your own
image: skhatri/apache-hive:3.1.3
#building your own - download apache-hive and hadoop into hive folder. check Dockerfile
#build:
# context: .
# dockerfile: hive/Dockerfile
container_name: hive
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- STORE_KEY=${STORE_KEY}
- STORE_SECRET=${STORE_SECRET}
volumes:
- ./hive/conf/hive-site.xml:/opt/app/apache-hive-3.1.3-bin/conf/hive-site.xml
- ./hive/data:/tmp/hive
#copy output data directory from https://github.com/skhatri/spark-delta-by-example project
- ./hive/output:/opt/data/output
ports:
- "10000:10000"
- "9083:9083"
networks:
ntrino:
aliases:
- hive
depends_on:
postgres:
condition: service_healthy
coordinator:
build: .
container_name: coordinator
environment:
- STORE_KEY=${STORE_KEY}
- STORE_SECRET=${STORE_SECRET}
- S3_ENDPOINT=${S3_ENDPOINT}
ports:
- "8080:8080"
- "8443:8443"
expose:
- "8080"
- "8443"
user: trino
volumes:
- ./tmp/data/coordinator:/data/trino:rw
- ./coordinator:/etc/trino:rw
- ./security:/opt/trino/security:rw
- ./certs:/opt/trino/certs:rw
- ./hive/output:/opt/data/output:rw
networks:
ntrino:
aliases:
- coordinator
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sS http://localhost:8080/|| exit 1"]
interval: "20s"
timeout: "20s"
retries: 3
worker-1:
build: .
container_name: worker-1
environment:
- STORE_KEY=${STORE_KEY}
- STORE_SECRET=${STORE_SECRET}
- S3_ENDPOINT=${S3_ENDPOINT}
ports:
- "8090:8080"
- "9443:8443"
user: trino
volumes:
- workerdb:/data/trino
- ./worker:/etc/trino
- ./certs:/opt/trino/certs
- ./hive/output:/opt/data/output
networks:
ntrino:
aliases:
- worker-1
depends_on:
coordinator:
condition: service_healthy
superset:
#if issues building it, use the image below
build: superset
#image: ${REPO}cloudnativek8s/superset:latest-dev
container_name: superset
environment:
- DATA_DIR=/opt/superset/data
- MAPBOX_API_KEY=${MAPBOX_API_KEY}
- SUPERSET_SECRET_KEY=HAjeudha2uahde*$Hau&@1
volumes:
- ./certs:/opt/superset/certs
- supersetdb:/opt/superset/data
ports:
- "9000:8088"
networks:
ntrino:
aliases:
- superset
depends_on:
coordinator:
condition: service_healthy
postgres:
condition: service_healthy
trino-proxy:
image: "${REPO}envoyproxy/envoy-dev:latest"
command: /usr/local/bin/envoy -c /etc/trino-envoy.yaml --service-cluster trino_coordinator -l debug
container_name: "trino-proxy"
volumes:
- ./envoy/trino-envoy.yaml:/etc/trino-envoy.yaml
- ./certs/:/opt/certs
networks:
ntrino:
aliases:
- trino-proxy
expose:
- "8453"
- "8001"
ports:
- "8453:8453"
- "8001:8001"
#AWS_ACCESS_KEY_ID=minio AWS_SECRET_ACCESS_KEY=minio123 aws s3 --endpoint-url http://localhost:9005 ls s3://
minio:
image: ${REPO}minio/minio:RELEASE.2022-03-03T21-21-16Z
#command: "server /data --console-address :9001"
#s3 backend can be set to "gateway s3" or "server /data"
#if this command fails, replace S3_BACKEND with one of the desired values
command: "${S3_BACKEND} --address :9000 --console-address :9001"
container_name: "minio"
environment:
- MINIO_ROOT_USER=${STORE_KEY}
- MINIO_ROOT_PASSWORD=${STORE_SECRET}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ./minio/data:/data
networks:
ntrino:
aliases:
- minio
expose:
- "9000"
- "9001"
ports:
- "9005:9000"
- "9001:9001"
networks:
ntrino: {}