Blame view

docker/PYROS_DOCKER_INSTALL 786 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
e1d22a59   Alexis Koralewski   Change redis cont...
4
if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ]
e1e75163   Alexis Koralewski   fixing issue with...
5
then
ec4214ff   Alexis Koralewski   Renaming pyros co...
6
    echo "pyros-db or pyros weren't running, starting them..."
e1e75163   Alexis Koralewski   fixing issue with...
7
8
    ./PYROS_DOCKER_START.bat
fi
af97f680   Etienne Pallier   changed version f...
9

e1e75163   Alexis Koralewski   fixing issue with...
10
# while db container isn't ready to execute queries, wait 5 seconds
ec4214ff   Alexis Koralewski   Renaming pyros co...
11
if ! docker inspect pyros-db --format='{{.State.Health.Status}}' | grep -q 'healthy'
da7c081d   Alexis Koralewski   remove extension ...
12
13
14
then
    echo "db service isn't ready yet, waiting until it's ready..."
fi
ec4214ff   Alexis Koralewski   Renaming pyros co...
15
while ! docker inspect pyros-db --format='{{.State.Health.Status}}' | grep -q 'healthy'
e1e75163   Alexis Koralewski   fixing issue with...
16
17
do
    sleep 5
ec4214ff   Alexis Koralewski   Renaming pyros co...
18
    heal_status=$(docker inspect pyros-db --format='{{.State.Health.Status}}')
e4c37a1a   Alexis Koralewski   Upgrading mysql v...
19
    echo "Current status : $heal_status"
e1e75163   Alexis Koralewski   fixing issue with...
20
done
af97f680   Etienne Pallier   changed version f...
21

e1e75163   Alexis Koralewski   fixing issue with...
22
# db container is ready to execture queries, we can start the installation
23a61124   Alexis Koralewski   Change obsconfig ...
23
docker-compose exec pyros python3 pyros.py install
0e02606c   Etienne Pallier   Changed version n...