Small script updates

This commit is contained in:
Matthew Lopez 2023-12-20 17:33:29 -05:00
parent a68f4b1f9d
commit 47a91661c1
No known key found for this signature in database
GPG Key ID: 302A6EE3D63B7E0E
2 changed files with 5 additions and 3 deletions

View File

@ -7,9 +7,6 @@ minio_init_script=$(cat "$git_base/config/minio-init.sh")
docker compose up -d minio
# TODO: Find a better way to do this in case Minio takes longer to start up
echo "Waiting for minio to be ready..."
sleep 2
docker compose exec minio sh -c "$minio_init_script"
docker compose down minio

View File

@ -7,6 +7,11 @@ mongodb_init_script=$(cat "$git_base/config/mongodb-init.js")
docker compose up -d mongodb
# This won't work in /docker-entrypoint-initdb.d/ because MongoDB is in a
# special init state where it will refuse to resolve anything but localhost.
# This needs to be run after it initializes.
# https://github.com/docker-library/mongo/issues/339
while ! docker compose exec mongodb mongosh --eval "db.adminCommand('ping')"; do
echo "Waiting for mongodb to be ready..."
sleep 1