Blame view

docker/PYROS_DOCKER_INSTALL 660 Bytes
e64cdd09   ALEXIS-PC\alexis   improving check a...
1
#!/usr/bin/env bash
e1e75163   Alexis Koralewski   fixing issue with...
2
3

# if no container is running
e64cdd09   ALEXIS-PC\alexis   improving check a...
4
if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 2 ]
e1e75163   Alexis Koralewski   fixing issue with...
5
then
da7c081d   Alexis Koralewski   remove extension ...
6
    echo "db_pyros or pyros weren't running, starting them..."
e1e75163   Alexis Koralewski   fixing issue with...
7
8
9
    ./PYROS_DOCKER_START.bat
fi
# while db container isn't ready to execute queries, wait 5 seconds
da7c081d   Alexis Koralewski   remove extension ...
10
11
12
13
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
e1e75163   Alexis Koralewski   fixing issue with...
14
15
16
17
18
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
e64cdd09   ALEXIS-PC\alexis   improving check a...
19
docker exec -it pyros python3 pyros.py install
0e02606c   Etienne Pallier   Changed version n...