Commit 1b11a72fe5b986af1de46ba33767a1b86c38f7cd

Authored by Alexis Koralewski
1 parent 6decf1a3
Exists in dev

Update docker script (docker compose usage)

@@ -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
@@ -8,6 +8,6 @@ then @@ -8,6 +8,6 @@ then
8 echo "You can't run this script as root, use a normal user" 8 echo "You can't run this script as root, use a normal user"
9 exit 1 9 exit 1
10 else 10 else
11 -docker-compose build 11 +docker compose build
12 fi 12 fi
13 13
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
1 -docker-compose exec pyros python3 pyros.py install 1 +docker compose exec pyros python3 pyros.py install
2 2
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
1 -docker-compose exec pyros python3 pyros.py start webserver %* 1 +docker compose exec pyros python3 pyros.py start webserver %*
2 2
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
1 -docker-compose exec pyros bash 1 +docker compose exec pyros bash
2 2
docker/PYROS_DOCKER_START.bat
1 set CURRENT_UID=1001 1 set CURRENT_UID=1001
2 set COMPUTER_HOSTNAME=%COMPUTERNAME% 2 set COMPUTER_HOSTNAME=%COMPUTERNAME%
3 -docker-compose down --remove-orphans  
4 -docker-compose up -d 3 +docker compose down --remove-orphans
  4 +docker compose up -d
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
1 export CURRENT_UID=$(id -u) 1 export CURRENT_UID=$(id -u)
2 -docker-compose down 2 +docker compose down
3 3
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
1 -docker-compose exec pyros python3 pyros.py test 1 +docker compose exec pyros python3 pyros.py test
2 2
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