From 0982f15e773b7a2e4952dec73e21dc029d909e1d Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 15 Nov 2023 00:59:32 +0100 Subject: [PATCH] removed regen and staging scripts as they have been replaced by docker-compose --- resources/scripts/regen.sh | 45 ------------------------------------ resources/scripts/staging.sh | 28 ---------------------- 2 files changed, 73 deletions(-) delete mode 100755 resources/scripts/regen.sh delete mode 100755 resources/scripts/staging.sh diff --git a/resources/scripts/regen.sh b/resources/scripts/regen.sh deleted file mode 100755 index 7458107bb..000000000 --- a/resources/scripts/regen.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/bash - -# shellcheck disable=SC1091 -source venv/bin/activate - -echo "regenerating the data for /data" -( -cd ./data || exit -python compile.py -rsync ../openapi.yaml output/openapi.yaml -) - - -echo "regenerating the data for server/main-api" -( -cd ./server/main-api || exit -mkdir -p data -rm -f data/* -cp ../../data/*.json data/ -cp ../../data/output/*.json data/ -python load_api_data_to_db.py -) - - -echo "initalising the database for server/calendar" -( -cd ./server/calendar || exit -python init_db.py -) - - -echo "regenerating the data for /webclient" -( -cd ./webclient || exit -mkdir -p cdn -rsync -r --exclude '*.yaml' ../data/sources/img/ cdn/ -cp -r ../data/external/results/maps/roomfinder/* cdn/maps/roomfinder -) - - -echo "building the mielesearch dockerfile" -( - cd server/main-api || exit - docker build -t msinit . -f ./Dockerfile.msinit -) diff --git a/resources/scripts/staging.sh b/resources/scripts/staging.sh deleted file mode 100755 index ace6aa981..000000000 --- a/resources/scripts/staging.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/bash - -# if there SIGINT, SIGTERM or EXIT are signaled: -# - kill all subshells and -# - stop+delete mielesearch -trap 'trap - SIGTERM && docker rm $(docker stop --time 0 $(docker ps -a -q --filter ancestor=search --format="{{.ID}}")) && kill -- -$$' SIGINT SIGTERM EXIT -set -e - -echo "starting meili" -( -TMP="$(mktemp --directory)" -echo "using $TMP as temporary directory for meili" -docker run -v "$TMP/meili_data":/meili_data -t msinit || exit -docker run -v "$TMP/meili_data":/meili_data -p 7700:7700 getmeili/meilisearch:latest || exit -) & -sleep 1 # to make sure, that the meili-log is before any other log :) - -echo "starting the server" -( - cd server/main-api || exit - cargo run - exit -) & - -echo "starting the webclient" -cd webclient || exit -gulp -python -m http.server