@@ -7,13 +7,18 @@ services:
77 - " 127.0.0.1:5432:5432"
88 command : postgres -c max_connections=500
99 environment :
10- POSTGRES_USER : admin
11- POSTGRES_PASSWORD : admin
10+ POSTGRES_USER : ${POSTGRES_USER:- admin}
11+ POSTGRES_PASSWORD : ${POSTGRES_PASSWORD:- admin}
1212 volumes :
1313 - postgres:/var/lib/postgresql/data
14+ healthcheck :
15+ test : ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-admin}"]
16+ interval : 5s
17+ timeout : 5s
18+ retries : 10
1419
1520 clickhouse :
16- image : clickhouse/clickhouse-server:latest
21+ image : clickhouse/clickhouse-server:24.3
1722 container_name : clickhouse
1823 ports :
1924 - " 8123:8123"
@@ -23,11 +28,16 @@ services:
2328 environment :
2429 CLICKHOUSE_DB : default
2530 CLICKHOUSE_USER : default
26- CLICKHOUSE_PASSWORD : " default"
31+ CLICKHOUSE_PASSWORD : ${CLICKHOUSE_PASSWORD:- default}
2732 ulimits :
2833 nofile :
2934 soft : 262144
3035 hard : 262144
36+ healthcheck :
37+ test : ["CMD-SHELL", "curl -sf http://localhost:8123/ping"]
38+ interval : 5s
39+ timeout : 5s
40+ retries : 10
3141
3242 # ── Trino (with Iceberg + Hive Metastore + MinIO) ──────────────────
3343 trino :
@@ -37,14 +47,30 @@ services:
3747 volumes :
3848 - ./docker/trino/etc:/usr/lib/trino/etc:ro
3949 - ./docker/trino/catalog:/etc/trino/catalog
50+ depends_on :
51+ hive-metastore :
52+ condition : service_healthy
53+ trino-mc-job :
54+ condition : service_completed_successfully
55+ healthcheck :
56+ test : ["CMD-SHELL", "curl -sf http://localhost:8080/v1/info | grep -q '\"starting\":false'"]
57+ interval : 5s
58+ timeout : 5s
59+ retries : 60
60+ start_period : 10s
4061
4162 trino-metastore-db :
4263 image : postgres:11
4364 hostname : metastore_db
4465 environment :
45- POSTGRES_USER : hive
46- POSTGRES_PASSWORD : hive
66+ POSTGRES_USER : ${HIVE_METASTORE_USER:- hive}
67+ POSTGRES_PASSWORD : ${HIVE_METASTORE_PASSWORD:- hive}
4768 POSTGRES_DB : metastore
69+ healthcheck :
70+ test : ["CMD-SHELL", "pg_isready -U ${HIVE_METASTORE_USER:-hive}"]
71+ interval : 5s
72+ timeout : 5s
73+ retries : 10
4874
4975 hive-metastore :
5076 hostname : hive-metastore
@@ -54,12 +80,12 @@ services:
5480 environment :
5581 HIVE_METASTORE_DRIVER : org.postgresql.Driver
5682 HIVE_METASTORE_JDBC_URL : jdbc:postgresql://metastore_db:5432/metastore
57- HIVE_METASTORE_USER : hive
58- HIVE_METASTORE_PASSWORD : hive
83+ HIVE_METASTORE_USER : ${HIVE_METASTORE_USER:- hive}
84+ HIVE_METASTORE_PASSWORD : ${HIVE_METASTORE_PASSWORD:- hive}
5985 HIVE_METASTORE_WAREHOUSE_DIR : s3://datalake/
6086 S3_ENDPOINT : http://trino-minio:9000
61- S3_ACCESS_KEY : minio
62- S3_SECRET_KEY : minio123
87+ S3_ACCESS_KEY : ${TRINO_MINIO_ACCESS_KEY:- minio}
88+ S3_SECRET_KEY : ${TRINO_MINIO_SECRET_KEY:- minio123}
6389 S3_PATH_STYLE_ACCESS : " true"
6490 REGION : " "
6591 GOOGLE_CLOUD_KEY_FILE_PATH : " "
@@ -77,7 +103,16 @@ services:
77103 AZURE_WASB_ACCESS_KEY : " "
78104 HIVE_METASTORE_USERS_IN_ADMIN_ROLE : " admin"
79105 depends_on :
80- - trino-metastore-db
106+ trino-metastore-db :
107+ condition : service_healthy
108+ trino-minio :
109+ condition : service_healthy
110+ healthcheck :
111+ test : ["CMD-SHELL", "nc -z localhost 9083"]
112+ interval : 5s
113+ timeout : 5s
114+ retries : 30
115+ start_period : 10s
81116
82117 trino-minio :
83118 hostname : minio
@@ -86,36 +121,48 @@ services:
86121 - " 9002:9000"
87122 - " 9003:9001"
88123 environment :
89- MINIO_ACCESS_KEY : minio
90- MINIO_SECRET_KEY : minio123
124+ MINIO_ACCESS_KEY : ${TRINO_MINIO_ACCESS_KEY:- minio}
125+ MINIO_SECRET_KEY : ${TRINO_MINIO_SECRET_KEY:- minio123}
91126 command : server /data --console-address ":9001"
127+ healthcheck :
128+ test : ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live"]
129+ interval : 5s
130+ timeout : 5s
131+ retries : 10
92132
93133 trino-mc-job :
94134 image : " minio/mc:RELEASE.2022-05-09T04-08-26Z"
95135 entrypoint : |
96136 /bin/bash -c "
97- sleep 5;
98- /usr/bin/mc config --quiet host add myminio http://minio:9000 minio minio123;
99- /usr/bin/mc mb --quiet myminio/datalake
137+ until /usr/bin/mc config --quiet host add myminio http://minio:9000 $${TRINO_MINIO_ACCESS_KEY:-minio} $${TRINO_MINIO_SECRET_KEY:-minio123}; do
138+ sleep 2;
139+ done;
140+ /usr/bin/mc mb --quiet --ignore-existing myminio/datalake
100141 "
101142 depends_on :
102- - trino-minio
143+ trino-minio :
144+ condition : service_healthy
103145
104146 # ── Dremio (with Nessie + MinIO) ───────────────────────────────────
105147 nessie :
106- image : projectnessie/nessie:latest
148+ image : projectnessie/nessie:0.80.0
107149 container_name : catalog
108150 networks :
109151 - dremio-lakehouse
110152 ports :
111153 - " 19120:19120"
154+ healthcheck :
155+ test : ["CMD-SHELL", "curl -sf http://localhost:19120/api/v2/config || exit 1"]
156+ interval : 5s
157+ timeout : 5s
158+ retries : 10
112159
113160 dremio-minio :
114- image : minio/minio:latest
161+ image : minio/minio:RELEASE.2024-01-18T22-51-28Z
115162 container_name : dremio-storage
116163 environment :
117- - MINIO_ROOT_USER=admin
118- - MINIO_ROOT_PASSWORD=password
164+ - MINIO_ROOT_USER=${DREMIO_MINIO_ROOT_USER:- admin}
165+ - MINIO_ROOT_PASSWORD=${DREMIO_MINIO_ROOT_PASSWORD:- password}
119166 - MINIO_DOMAIN=storage
120167 - MINIO_REGION_NAME=us-east-1
121168 - MINIO_REGION=us-east-1
@@ -127,27 +174,29 @@ services:
127174 command : ["server", "/data", "--console-address", ":9001"]
128175 volumes :
129176 - dremio-minio-data:/data
177+ healthcheck :
178+ test : ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live"]
179+ interval : 5s
180+ timeout : 5s
181+ retries : 10
130182
131183 dremio-minio-setup :
132- image : minio/mc
184+ image : minio/mc:RELEASE.2024-01-18T07-03-39Z
133185 container_name : dremio-minio-setup
134186 depends_on :
135- - dremio-minio
187+ dremio-minio :
188+ condition : service_healthy
136189 entrypoint : >
137190 /bin/sh -c "
138- until (echo > /dev/tcp/dremio-storage/9000) >/dev/null 2>&1; do
139- echo 'Waiting for MinIO...';
140- sleep 2;
141- done;
142- mc alias set myminio http://dremio-storage:9000 admin password;
143- mc mb myminio/datalake;
191+ mc alias set myminio http://dremio-storage:9000 $${DREMIO_MINIO_ROOT_USER:-admin} $${DREMIO_MINIO_ROOT_PASSWORD:-password};
192+ mc mb --ignore-existing myminio/datalake;
144193 mc ls myminio;
145194 "
146195 networks :
147196 - dremio-lakehouse
148197
149198 dremio :
150- image : dremio/dremio-oss:latest
199+ image : dremio/dremio-oss:25.1.0
151200 platform : linux/amd64
152201 ports :
153202 - " 9047:9047"
@@ -172,11 +221,18 @@ services:
172221 start_period : 15s
173222
174223 dremio-setup :
175- image : alpine:latest
224+ image : alpine:3.19
176225 container_name : dremio-setup
177226 depends_on :
178227 dremio :
179228 condition : service_healthy
229+ dremio-minio-setup :
230+ condition : service_completed_successfully
231+ environment :
232+ DREMIO_USER : ${DREMIO_USER:-dremio}
233+ DREMIO_PASS : ${DREMIO_PASS:-dremio123}
234+ MINIO_ROOT_USER : ${DREMIO_MINIO_ROOT_USER:-admin}
235+ MINIO_ROOT_PASSWORD : ${DREMIO_MINIO_ROOT_PASSWORD:-password}
180236 volumes :
181237 - ./docker/dremio/dremio-setup.sh:/dremio-setup.sh
182238 command : sh /dremio-setup.sh
@@ -193,7 +249,8 @@ services:
193249 - " 10000:10000"
194250 - " 4040:4040"
195251 depends_on :
196- - spark-hive-metastore
252+ spark-hive-metastore :
253+ condition : service_healthy
197254 command : >
198255 --class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2
199256 --name Thrift JDBC/ODBC Server
@@ -216,9 +273,14 @@ services:
216273 volumes :
217274 - spark-hive-metastore:/var/lib/postgresql/data
218275 environment :
219- - POSTGRES_USER=dbt
220- - POSTGRES_PASSWORD=dbt
276+ - POSTGRES_USER=${SPARK_METASTORE_USER:- dbt}
277+ - POSTGRES_PASSWORD=${SPARK_METASTORE_PASSWORD:- dbt}
221278 - POSTGRES_DB=metastore
279+ healthcheck :
280+ test : ["CMD-SHELL", "pg_isready -U ${SPARK_METASTORE_USER:-dbt}"]
281+ interval : 5s
282+ timeout : 5s
283+ retries : 10
222284
223285networks :
224286 dremio-lakehouse :
0 commit comments