Blame view

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

a56e6e0e   Etienne Pallier   comments and shor...
3
4
# PRE-CONDITION : pyros container must be running

e1e75163   Alexis Koralewski   fixing issue with...
5
# if no container is running
e7016f79   Etienne Pallier   cleanup Dockerfil...
6
if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ] ; then
ec4214ff   Alexis Koralewski   Renaming pyros co...
7
    echo "pyros-db or pyros weren't running, starting them..."
b1e4e4dd   Etienne Pallier   Renamed scripts P...
8
    ./PYROS_DOCKER_START
2da110b4   Etienne Pallier   fix call to START...
9
    #./PYROS_DOCKER_START.bat
e1e75163   Alexis Koralewski   fixing issue with...
10
fi
af97f680   Etienne Pallier   changed version f...
11

e1e75163   Alexis Koralewski   fixing issue with...
12
# while db container isn't ready to execute queries, wait 5 seconds
e7016f79   Etienne Pallier   cleanup Dockerfil...
13
14
15
#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 ...
16
    echo "db service isn't ready yet, waiting until it's ready..."
e1e75163   Alexis Koralewski   fixing issue with...
17
    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

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