Commit 1b11a72fe5b986af1de46ba33767a1b86c38f7cd
1 parent
6decf1a3
Exists in
dev
Update docker script (docker compose usage)
Showing
17 changed files
with
22 additions
and
22 deletions
Show diff stats
PYROSW.py
@@ -106,12 +106,12 @@ PYROS_CMD = PYROS_CMD.rstrip() | @@ -106,12 +106,12 @@ PYROS_CMD = PYROS_CMD.rstrip() | ||
106 | if DOCKER_OUT_CONTAINER: | 106 | if DOCKER_OUT_CONTAINER: |
107 | # cd docker/ | 107 | # cd docker/ |
108 | os.chdir('docker') | 108 | os.chdir('docker') |
109 | - # docker-compose up -d | ||
110 | - res = subprocess.run("docker-compose exec pyros python3 pyros.py",shell=True,stdout=subprocess.DEVNULL) | 109 | + # docker compose up -d |
110 | + res = subprocess.run("docker compose exec pyros python3 pyros.py",shell=True,stdout=subprocess.DEVNULL) | ||
111 | if res.returncode != 0: | 111 | if res.returncode != 0: |
112 | - run('docker-compose up -d') | 112 | + run('docker compose up -d') |
113 | sleep(5) | 113 | sleep(5) |
114 | - PYROS_CMD = 'docker-compose exec pyros ' + PYROS_CMD | 114 | + PYROS_CMD = 'docker compose exec pyros ' + PYROS_CMD |
115 | 115 | ||
116 | if VENV: | 116 | if VENV: |
117 | does_venv_folder_exists = os.path.exists("./venv") | 117 | does_venv_folder_exists = os.path.exists("./venv") |
docker/PYROS_DOCKER_BUILD.bat
@@ -3,5 +3,5 @@ | @@ -3,5 +3,5 @@ | ||
3 | [ ! -d "../vendor/guitastro/" ] && git clone https://gitlab.irap.omp.eu/guitastrolib/guitastro.git ../vendor/guitastro/ | 3 | [ ! -d "../vendor/guitastro/" ] && git clone https://gitlab.irap.omp.eu/guitastrolib/guitastro.git ../vendor/guitastro/ |
4 | 4 | ||
5 | export CURRENT_UID=$(id -u) | 5 | export CURRENT_UID=$(id -u) |
6 | -docker-compose build | 6 | +docker compose build |
7 | 7 |
docker/PYROS_DOCKER_BUILD.sh
docker/PYROS_DOCKER_INSTALL
@@ -18,5 +18,5 @@ done | @@ -18,5 +18,5 @@ done | ||
18 | 18 | ||
19 | # db container is ready to execture queries | 19 | # db container is ready to execture queries |
20 | # We can now start the installation | 20 | # We can now start the installation |
21 | -docker-compose exec pyros python3 pyros.py install | 21 | +docker compose exec pyros python3 pyros.py install |
22 | 22 |
docker/PYROS_DOCKER_INSTALL.bat
docker/PYROS_DOCKER_RUN
@@ -13,7 +13,7 @@ echo "LOG files :" | @@ -13,7 +13,7 @@ echo "LOG files :" | ||
13 | # 1) Web server | 13 | # 1) Web server |
14 | # | 14 | # |
15 | # - Display log on current terminal | 15 | # - Display log on current terminal |
16 | -#docker-compose exec pyros python3 pyros.py start webserver $@ | 16 | +#docker compose exec pyros python3 pyros.py start webserver $@ |
17 | # - Save log in file | 17 | # - Save log in file |
18 | docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver > ../../LOG_PYROS_webserver.log 2>&1 & | 18 | docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver > ../../LOG_PYROS_webserver.log 2>&1 & |
19 | #docker exec pyros python3 pyros.py -d start -o guitalens webserver >> ../../LOG_PYROS_webserver.log 2>&1 & | 19 | #docker exec pyros python3 pyros.py -d start -o guitalens webserver >> ../../LOG_PYROS_webserver.log 2>&1 & |
docker/PYROS_DOCKER_RUN_WEBSERVER_ONLY
@@ -7,7 +7,7 @@ if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ] ; then | @@ -7,7 +7,7 @@ if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ] ; then | ||
7 | fi | 7 | fi |
8 | 8 | ||
9 | docker compose exec pyros python3 pyros.py -d start webserver $@ | 9 | docker compose exec pyros python3 pyros.py -d start webserver $@ |
10 | -#docker-compose exec pyros python3 pyros.py -d start webserver $@ | 10 | +#docker compose exec pyros python3 pyros.py -d start webserver $@ |
11 | #docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver $@ | 11 | #docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver $@ |
12 | #docker exec -it pyros python3 pyros.py start webserver $@ | 12 | #docker exec -it pyros python3 pyros.py start webserver $@ |
13 | #docker exec -it pyros python3 pyros.py -d start -o tnc webserver $@ | 13 | #docker exec -it pyros python3 pyros.py -d start -o tnc webserver $@ |
docker/PYROS_DOCKER_RUN_WEBSERVER_ONLY.bat
docker/PYROS_DOCKER_SHELL
@@ -6,5 +6,5 @@ then | @@ -6,5 +6,5 @@ then | ||
6 | echo "pyros-db or pyros weren't running, starting them..." | 6 | echo "pyros-db or pyros weren't running, starting them..." |
7 | ./PYROS_DOCKER_START.bat | 7 | ./PYROS_DOCKER_START.bat |
8 | fi | 8 | fi |
9 | -docker-compose exec pyros bash $@ | 9 | +docker compose exec pyros bash $@ |
10 | 10 |
docker/PYROS_DOCKER_SHELL.bat
docker/PYROS_DOCKER_START.bat
docker/PYROS_DOCKER_START.sh
@@ -3,11 +3,11 @@ export COMPUTER_HOSTNAME=$HOSTNAME | @@ -3,11 +3,11 @@ export COMPUTER_HOSTNAME=$HOSTNAME | ||
3 | 3 | ||
4 | echo | 4 | echo |
5 | echo "First STOP just in case:" | 5 | echo "First STOP just in case:" |
6 | -docker-compose down --remove-orphans | 6 | +docker compose down --remove-orphans |
7 | 7 | ||
8 | echo | 8 | echo |
9 | echo "Then START:" | 9 | echo "Then START:" |
10 | -docker-compose up -d | 10 | +docker compose up -d |
11 | 11 | ||
12 | # See started containers | 12 | # See started containers |
13 | echo | 13 | echo |
docker/PYROS_DOCKER_STOP.bat
docker/PYROS_DOCKER_TEST
@@ -6,5 +6,5 @@ then | @@ -6,5 +6,5 @@ then | ||
6 | echo "pyros-db or pyros weren't running, starting them..." | 6 | echo "pyros-db or pyros weren't running, starting them..." |
7 | ./PYROS_DOCKER_START.bat | 7 | ./PYROS_DOCKER_START.bat |
8 | fi | 8 | fi |
9 | -docker-compose exec pyros python3 pyros.py test $@ | 9 | +docker compose exec pyros python3 pyros.py test $@ |
10 | 10 |
docker/PYROS_DOCKER_TEST.bat
docker/PYROS_DOCKER_UPDATE
@@ -22,5 +22,5 @@ do | @@ -22,5 +22,5 @@ do | ||
22 | done | 22 | done |
23 | 23 | ||
24 | # 3) pyros.py update => update BD + doc + Guitastro requirements | 24 | # 3) pyros.py update => update BD + doc + Guitastro requirements |
25 | -docker-compose exec pyros python3 pyros.py update | 25 | +docker compose exec pyros python3 pyros.py update |
26 | 26 |
docker/PYROS_DOCKER_UPDATE.bat
@@ -3,5 +3,5 @@ | @@ -3,5 +3,5 @@ | ||
3 | # 2) (TODO) Update PyROS | 3 | # 2) (TODO) Update PyROS |
4 | 4 | ||
5 | # 3) pyros.py update => update BD + doc + Guitastro requirements | 5 | # 3) pyros.py update => update BD + doc + Guitastro requirements |
6 | -docker-compose exec pyros python3 pyros.py update | 6 | +docker compose exec pyros python3 pyros.py update |
7 | 7 |