From da7c081d32807127d36aac8e3c78ea72705ce50d Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Tue, 23 Mar 2021 16:25:09 +0100 Subject: [PATCH] remove extension from PYROS_DOCKER bash scripts --- docker/PYROS_DOCKER_INSTALL | 19 +++++++++++++++++++ docker/PYROS_DOCKER_INSTALL.sh | 14 -------------- docker/PYROS_DOCKER_RUN | 10 ++++++++++ docker/PYROS_DOCKER_RUN.sh | 9 --------- docker/PYROS_DOCKER_SHELL | 9 +++++++++ docker/PYROS_DOCKER_SHELL.sh | 8 -------- docker/PYROS_DOCKER_TEST | 10 ++++++++++ docker/PYROS_DOCKER_TEST.sh | 9 --------- docker/PYROS_DOCKER_UPDATE | 10 ++++++++++ docker/PYROS_DOCKER_UPDATE.sh | 9 --------- 10 files changed, 58 insertions(+), 49 deletions(-) create mode 100755 docker/PYROS_DOCKER_INSTALL delete mode 100755 docker/PYROS_DOCKER_INSTALL.sh create mode 100755 docker/PYROS_DOCKER_RUN delete mode 100755 docker/PYROS_DOCKER_RUN.sh create mode 100755 docker/PYROS_DOCKER_SHELL delete mode 100755 docker/PYROS_DOCKER_SHELL.sh create mode 100755 docker/PYROS_DOCKER_TEST delete mode 100755 docker/PYROS_DOCKER_TEST.sh create mode 100755 docker/PYROS_DOCKER_UPDATE delete mode 100755 docker/PYROS_DOCKER_UPDATE.sh diff --git a/docker/PYROS_DOCKER_INSTALL b/docker/PYROS_DOCKER_INSTALL new file mode 100755 index 0000000..8020c54 --- /dev/null +++ b/docker/PYROS_DOCKER_INSTALL @@ -0,0 +1,19 @@ +#!/bin/bash + +# if no container is running +if ! docker ps | grep -q 'db_pyros|pyros' +then + echo "db_pyros 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 db_pyros --format='{{.State.Health.Status}}' | grep -q 'healthy' +then + echo "db service isn't ready yet, waiting until it's ready..." +fi +while ! docker inspect db_pyros --format='{{.State.Health.Status}}' | grep -q 'healthy' +do + sleep 5 +done +# db container is ready to execture queries, we can start the installation +docker exec -it pyros python3 pyros.py install \ No newline at end of file diff --git a/docker/PYROS_DOCKER_INSTALL.sh b/docker/PYROS_DOCKER_INSTALL.sh deleted file mode 100755 index b2fa855..0000000 --- a/docker/PYROS_DOCKER_INSTALL.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# if no container is running -if ! docker ps | grep -q 'db_pyros|pyros' -then - ./PYROS_DOCKER_START.bat -fi -# while db container isn't ready to execute queries, wait 5 seconds -while ! docker inspect db_pyros --format='{{.State.Health.Status}}' | grep -q 'healthy' -do - sleep 5 -done -# db container is ready to execture queries, we can start the installation -docker exec -it pyros python3 pyros.py install \ No newline at end of file diff --git a/docker/PYROS_DOCKER_RUN b/docker/PYROS_DOCKER_RUN new file mode 100755 index 0000000..28d66b6 --- /dev/null +++ b/docker/PYROS_DOCKER_RUN @@ -0,0 +1,10 @@ +#!/bin/bash + +#if no container is running +if ! docker ps | grep -q 'db_pyros|pyros' +then + echo "db_pyros or pyros weren't running, starting them..." + ./PYROS_DOCKER_START.bat +fi +docker exec -it pyros python3 pyros.py start webserver + diff --git a/docker/PYROS_DOCKER_RUN.sh b/docker/PYROS_DOCKER_RUN.sh deleted file mode 100755 index 630abdf..0000000 --- a/docker/PYROS_DOCKER_RUN.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -#if no container is running -if ! docker ps | grep -q 'db_pyros|pyros' -then - ./PYROS_DOCKER_START.bat -fi -docker exec -it pyros python3 pyros.py start webserver - diff --git a/docker/PYROS_DOCKER_SHELL b/docker/PYROS_DOCKER_SHELL new file mode 100755 index 0000000..fcdc6ef --- /dev/null +++ b/docker/PYROS_DOCKER_SHELL @@ -0,0 +1,9 @@ +#!/bin/bash + +#if no container is running +if ! docker ps | grep -q 'db_pyros|pyros' +then + echo "db_pyros or pyros weren't running, starting them..." + ./PYROS_DOCKER_START.bat +fi +docker exec -it pyros bash \ No newline at end of file diff --git a/docker/PYROS_DOCKER_SHELL.sh b/docker/PYROS_DOCKER_SHELL.sh deleted file mode 100755 index 145d378..0000000 --- a/docker/PYROS_DOCKER_SHELL.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -#if no container is running -if ! docker ps | grep -q 'db_pyros|pyros' -then - ./PYROS_DOCKER_START.bat -fi -docker exec -it pyros bash \ No newline at end of file diff --git a/docker/PYROS_DOCKER_TEST b/docker/PYROS_DOCKER_TEST new file mode 100755 index 0000000..3e9792b --- /dev/null +++ b/docker/PYROS_DOCKER_TEST @@ -0,0 +1,10 @@ +#!/bin/bash + +# if no container is running +if ! docker ps | grep -q 'db_pyros|pyros' +then + echo "db_pyros or pyros weren't running, starting them..." + ./PYROS_DOCKER_START.bat +fi +docker exec -it pyros python3 pyros.py test + diff --git a/docker/PYROS_DOCKER_TEST.sh b/docker/PYROS_DOCKER_TEST.sh deleted file mode 100755 index 8a96f68..0000000 --- a/docker/PYROS_DOCKER_TEST.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# if no container is running -if ! docker ps | grep -q 'db_pyros|pyros' -then - ./PYROS_DOCKER_START.bat -fi -docker exec -it pyros python3 pyros.py test - diff --git a/docker/PYROS_DOCKER_UPDATE b/docker/PYROS_DOCKER_UPDATE new file mode 100755 index 0000000..68c79ef --- /dev/null +++ b/docker/PYROS_DOCKER_UPDATE @@ -0,0 +1,10 @@ +#!/bin/bash + +# if no container is running +if ! docker ps | grep -q 'db_pyros|pyros' +then + echo "db_pyros or pyros weren't running, starting them..." + ./PYROS_DOCKER_START.bat +fi +docker exec -it pyros python3 pyros.py update + diff --git a/docker/PYROS_DOCKER_UPDATE.sh b/docker/PYROS_DOCKER_UPDATE.sh deleted file mode 100755 index 5090150..0000000 --- a/docker/PYROS_DOCKER_UPDATE.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# if no container is running -if ! docker ps | grep -q 'db_pyros|pyros' -then - ./PYROS_DOCKER_START.bat -fi -docker exec -it pyros python3 pyros.py update - -- libgit2 0.21.2