#!/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 echo "db service isn't ready yet, waiting until it's ready..." fi while ! docker inspect pyros-db --format='{{.State.Health.Status}}' | grep -q 'healthy' do 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 start the installation docker-compose exec pyros python3 pyros.py install