Blame view

docker/PYROS_DOCKER_INSTALL_DB 825 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
e7016f79   Etienne Pallier   cleanup Dockerfil...
4
if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ] ; then
ec4214ff   Alexis Koralewski   Renaming pyros co...
5
    echo "pyros-db or pyros weren't running, starting them..."
b1e4e4dd   Etienne Pallier   Renamed scripts P...
6
    ./PYROS_DOCKER_START
2da110b4   Etienne Pallier   fix call to START...
7
    #./PYROS_DOCKER_START.bat
e1e75163   Alexis Koralewski   fixing issue with...
8
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
e7016f79   Etienne Pallier   cleanup Dockerfil...
11
12
13
#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
da7c081d   Alexis Koralewski   remove extension ...
14
    echo "db service isn't ready yet, waiting until it's ready..."
e1e75163   Alexis Koralewski   fixing issue with...
15
    sleep 5
ec4214ff   Alexis Koralewski   Renaming pyros co...
16
    heal_status=$(docker inspect pyros-db --format='{{.State.Health.Status}}')
e4c37a1a   Alexis Koralewski   Upgrading mysql v...
17
    echo "Current status : $heal_status"
e1e75163   Alexis Koralewski   fixing issue with...
18
done
af97f680   Etienne Pallier   changed version f...
19

e7016f79   Etienne Pallier   cleanup Dockerfil...
20
21
# db container is ready to execture queries
# We can now start the installation
1b11a72f   Alexis Koralewski   Update docker scr...
22
docker compose exec pyros python3 pyros.py install
0e02606c   Etienne Pallier   Changed version n...