Skip to content

Commit 3966068

Browse files
author
Younes Mahmoudi
committed
Fix #76: Improve minio healthcheck for macOS compatibility
1 parent 1bb323d commit 3966068

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

documentation-samples/routine-load-shared-data/docker-compose.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
entrypoint: sh
1212
command: '-c ''mkdir -p /minio_data/starrocks && minio server /minio_data --console-address ":9001"'''
1313
healthcheck:
14-
test: ["CMD", "mc", "ready", "local"]
14+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
1515
interval: 5s
1616
timeout: 5s
1717
retries: 5
@@ -27,17 +27,18 @@ services:
2727
- sh
2828
- -c
2929
- |
30-
until mc ls minio > /dev/null 2>&1; do
31-
sleep 0.5
30+
until mc alias set myminio http://minio:9000 miniouser miniopassword; do
31+
echo "Waiting for MinIO to be ready...";
32+
sleep 1;
3233
done
3334
34-
mc alias set myminio http://minio:9000 miniouser miniopassword
3535
mc admin user svcacct add --access-key AAAAAAAAAAAAAAAAAAAA \
3636
--secret-key BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB \
3737
myminio \
3838
miniouser
3939
depends_on:
40-
- minio
40+
minio:
41+
condition: service_healthy
4142

4243
starrocks-fe:
4344
image: starrocks/fe-ubuntu:3.2-latest
@@ -143,3 +144,4 @@ services:
143144
- 8080:8080
144145
depends_on:
145146
- redpanda
147+

0 commit comments

Comments
 (0)