From e527a591d3305f50588982ea44db696ca32209c3 Mon Sep 17 00:00:00 2001 From: Doctor Date: Mon, 13 Sep 2021 21:24:46 +0200 Subject: [PATCH] Wait until Minio is ready before creating buckets Using a while loop and curl to get Minio root URL. --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4a2e569..4675df5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,6 +46,7 @@ services: env_file: .env entrypoint: > /bin/sh -c " + while ! curl -s --output /dev/null --connect-timeout 1 http://minio:9000; do echo 'Waiting minio...' && sleep 0.1; done; /usr/bin/mc alias set minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; /usr/bin/mc mb minio/attachments; /usr/bin/mc mb minio/avatars;