Commit 1b11a72fe5b986af1de46ba33767a1b86c38f7cd

Authored by Alexis Koralewski
1 parent 6decf1a3
Exists in dev

Update docker script (docker compose usage)

PYROSW.py
... ... @@ -106,12 +106,12 @@ PYROS_CMD = PYROS_CMD.rstrip()
106 106 if DOCKER_OUT_CONTAINER:
107 107 # cd docker/
108 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 111 if res.returncode != 0:
112   - run('docker-compose up -d')
  112 + run('docker compose up -d')
113 113 sleep(5)
114   - PYROS_CMD = 'docker-compose exec pyros ' + PYROS_CMD
  114 + PYROS_CMD = 'docker compose exec pyros ' + PYROS_CMD
115 115  
116 116 if VENV:
117 117 does_venv_folder_exists = os.path.exists("./venv")
... ...
docker/PYROS_DOCKER_BUILD.bat
... ... @@ -3,5 +3,5 @@
3 3 [ ! -d "../vendor/guitastro/" ] && git clone https://gitlab.irap.omp.eu/guitastrolib/guitastro.git ../vendor/guitastro/
4 4  
5 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 8 echo "You can't run this script as root, use a normal user"
9 9 exit 1
10 10 else
11   -docker-compose build
  11 +docker compose build
12 12 fi
13 13  
... ...
docker/PYROS_DOCKER_INSTALL
... ... @@ -18,5 +18,5 @@ done
18 18  
19 19 # db container is ready to execture queries
20 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 13 # 1) Web server
14 14 #
15 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 17 # - Save log in file
18 18 docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver > ../../LOG_PYROS_webserver.log 2>&1 &
19 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 fi
8 8  
9 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 11 #docker compose exec pyros python3 pyros.py -d start -o tnc -fg webserver $@
12 12 #docker exec -it pyros python3 pyros.py start webserver $@
13 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 6 echo "pyros-db or pyros weren't running, starting them..."
7 7 ./PYROS_DOCKER_START.bat
8 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 1 set CURRENT_UID=1001
2 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 3  
4 4 echo
5 5 echo "First STOP just in case:"
6   -docker-compose down --remove-orphans
  6 +docker compose down --remove-orphans
7 7  
8 8 echo
9 9 echo "Then START:"
10   -docker-compose up -d
  10 +docker compose up -d
11 11  
12 12 # See started containers
13 13 echo
... ...
docker/PYROS_DOCKER_STOP.bat
1 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 6 echo "pyros-db or pyros weren't running, starting them..."
7 7 ./PYROS_DOCKER_START.bat
8 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 22 done
23 23  
24 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 3 # 2) (TODO) Update PyROS
4 4  
5 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  
... ...