#!/usr/bin/env bash # if no container is running if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ] ; then echo "pyros-db or pyros weren't running, starting them..." ./PYROS_DOCKER_START.bat fi # while db container isn't ready to execute queries, wait 5 seconds #if ! docker inspect pyros-db --format='{{.State.Health.Status}}' | grep -q 'healthy' ; then #fi while ! docker inspect pyros-db --format='{{.State.Health.Status}}' | grep -q 'healthy' ; do echo "db service isn't ready yet, waiting until it's ready..." sleep 5 heal_status=$(docker inspect pyros-db --format='{{.State.Health.Status}}') echo "Current status : $heal_status" done # db container is ready to execture queries # We can now start the installation docker compose exec pyros python3 pyros.py install