From 75c09138bf298d51ca5d8154609a9fa60c848898 Mon Sep 17 00:00:00 2001 From: Marcel Clausen Date: Mon, 5 Sep 2022 15:11:32 +0200 Subject: [PATCH] fix docker-cmd script, do not create index on container start which are not yet present in the efs. This auto-create will fail during deploy because new sphinx config will be deployed before the database deploy. --- scripts/docker-cmd.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/scripts/docker-cmd.sh b/scripts/docker-cmd.sh index c7d6076e..711ea5c5 100755 --- a/scripts/docker-cmd.sh +++ b/scripts/docker-cmd.sh @@ -4,7 +4,6 @@ set -euo pipefail # fancy output green='\e[0;32m' red='\e[0;31m' -yellow='\e[1;33m' NC='\e[0m' # No Color SPHINXINDEX_VOLUME="/var/lib/sphinxsearch/data/index/" @@ -28,19 +27,6 @@ for index in "${array_orphaned[@]}"; do fi done -# create missing indexes -echo -e "${green}check all index from sphinx.conf and create them if they dont exist on filesystem. ${NC}" -for index in "${array_config[@]}"; do - # skip empty elements - [[ -z ${index} ]] && continue - if ! ls "${SPHINXINDEX_EFS}${index}".* &> /dev/null; then - echo -e "\t${yellow}creating index ${index}${NC}" - indexer "${index}" &> /dev/null - # sync missing indexes back to EFS - rsync --update -av --include "${index}.*" --exclude '*' /${SPHINXINDEX_VOLUME} ${SPHINXINDEX_EFS} - fi -done - # remove lock files in volume rm ${SPHINXINDEX_VOLUME}*.spl 2> /dev/null || :