Blame view

docker/PYROS_DOCKER_UPDATE 760 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

7407f600   Etienne Pallier   petites ameliorat...
5
# If no container is running Start it
e1d22a59   Alexis Koralewski   Change redis cont...
6
if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ]
e1e75163   Alexis Koralewski   fixing issue with...
7
then
ec4214ff   Alexis Koralewski   Renaming pyros co...
8
    echo "pyros-db or pyros weren't running, starting them..."
b1e4e4dd   Etienne Pallier   Renamed scripts P...
9
    ./PYROS_DOCKER_START
2da110b4   Etienne Pallier   fix call to START...
10
    #./PYROS_DOCKER_START.bat
e1e75163   Alexis Koralewski   fixing issue with...
11
fi
f11ebe06   Etienne Pallier   Dockerfile cleanu...
12

7407f600   Etienne Pallier   petites ameliorat...
13
# 1) Update Guitastro
f11ebe06   Etienne Pallier   Dockerfile cleanu...
14
15
echo "Updating Guitastro source code"
(cd ../vendor/guitastro/ ; git pull)
7407f600   Etienne Pallier   petites ameliorat...
16
17

# 2) Update PyROS
f11ebe06   Etienne Pallier   Dockerfile cleanu...
18
echo "Updating PyROS source code"
0977ece6   Alexis Koralewski   Adding git pull i...
19
git pull
f11ebe06   Etienne Pallier   Dockerfile cleanu...
20

a56e6e0e   Etienne Pallier   comments and shor...
21
22
23
24
25
26
# 3) Update all observatories with git repo
for dir in ../../PYROS_OBSERVATORY/* ; do
    if [ -d .git ] ; then 
        echo "Updating observatory $dir source code"
        git pull
    fi
3be8b2fc   Alexis Koralewski   Add git pull of o...
27
28
done

7407f600   Etienne Pallier   petites ameliorat...
29
# 3) pyros.py update => update BD + doc + Guitastro requirements
1b11a72f   Alexis Koralewski   Update docker scr...
30
docker compose exec pyros python3 pyros.py update
e1e75163   Alexis Koralewski   fixing issue with...