From 63f2beb2793fff7669231c5de7464ce052f493ec Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Fri, 6 Oct 2023 12:18:56 +0200 Subject: [PATCH] renamed PYROS_DOCKER_INSTALL => PYROS_DOCKER_INSTALL_DB, car c plu clair comme ca --- docker/PYROS_DOCKER_INSTALL | 23 ----------------------- docker/PYROS_DOCKER_INSTALL.bat | 2 -- docker/PYROS_DOCKER_INSTALL_DB | 23 +++++++++++++++++++++++ docker/PYROS_DOCKER_INSTALL_DB.bat | 2 ++ docker/docker-compose.yml | 1 + 5 files changed, 26 insertions(+), 25 deletions(-) delete mode 100755 docker/PYROS_DOCKER_INSTALL delete mode 100755 docker/PYROS_DOCKER_INSTALL.bat create mode 100755 docker/PYROS_DOCKER_INSTALL_DB create mode 100755 docker/PYROS_DOCKER_INSTALL_DB.bat diff --git a/docker/PYROS_DOCKER_INSTALL b/docker/PYROS_DOCKER_INSTALL deleted file mode 100755 index 72c7d28..0000000 --- a/docker/PYROS_DOCKER_INSTALL +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 - #./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 - diff --git a/docker/PYROS_DOCKER_INSTALL.bat b/docker/PYROS_DOCKER_INSTALL.bat deleted file mode 100755 index 9438238..0000000 --- a/docker/PYROS_DOCKER_INSTALL.bat +++ /dev/null @@ -1,2 +0,0 @@ -docker compose exec pyros python3 pyros.py install - diff --git a/docker/PYROS_DOCKER_INSTALL_DB b/docker/PYROS_DOCKER_INSTALL_DB new file mode 100755 index 0000000..72c7d28 --- /dev/null +++ b/docker/PYROS_DOCKER_INSTALL_DB @@ -0,0 +1,23 @@ +#!/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 + #./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 + diff --git a/docker/PYROS_DOCKER_INSTALL_DB.bat b/docker/PYROS_DOCKER_INSTALL_DB.bat new file mode 100755 index 0000000..9438238 --- /dev/null +++ b/docker/PYROS_DOCKER_INSTALL_DB.bat @@ -0,0 +1,2 @@ +docker compose exec pyros python3 pyros.py install + diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5af2339..ad5b981 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,7 @@ version: "3.9" name: pyros-app + services: ####################### -- libgit2 0.21.2