diff --git a/Dockerfile b/Dockerfile index c10f837..8555942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,6 @@ RUN \ curl -o \ /tmp/diskover-web.tar.gz -L \ "https://github.com/shirosaidev/diskover-web/archive/${DISKOVER_RELEASE}.tar.gz" && \ - #"https://github.com/shirosaidev/diskover-web/archive/v1.5.0.2.tar.gz" && \ tar xf \ /tmp/diskover-web.tar.gz -C \ /app/diskover-web/ --strip-components=1 && \ diff --git a/root/app/dispatcher.sh b/root/app/dispatcher.sh index b7122c0..a830c9b 100644 --- a/root/app/dispatcher.sh +++ b/root/app/dispatcher.sh @@ -14,30 +14,28 @@ DISKOVER_ARRAY[REDIS_PORT]=${REDIS_PORT:-6379} DISKOVER_ARRAY[DISKOVER_OPTS]="${DISKOVER_ARRAY[DISKOVER_OPTS]} -i ${DISKOVER_ARRAY[INDEX_NAME]}" -#declare -p DISKOVER_ARRAY > /config/.diskover_array - cd /app/diskover || exit -#/bin/bash -c ". /config/.diskover_array; /app/cleanup.sh" -# Testing moving contents of /app/cleanup.sh here +# Redis Cleanup # killing existing workers before starting new ones echo "killing existing workers..." if [ -f "/tmp/diskover_bot_pids" ]; then /bin/bash /app/diskover/diskover-bot-launcher.sh -k > /dev/null 2>&1 sleep 3 fi - # empty existing redis queue echo "emptying current redis queues..." rq empty -u redis://"${DISKOVER_ARRAY[REDIS_HOST]}":"${DISKOVER_ARRAY[REDIS_PORT]}" diskover_crawl diskover diskover_calcdir failed sleep 3 - +# kill dangling workers echo "killing dangling workers..." /bin/bash /app/diskover/diskover-bot-launcher.sh -k > /dev/null 2>&1 sleep 3 +# Start workers echo "starting workers with following options: ${DISKOVER_ARRAY[WORKER_OPTS]}" /bin/bash /app/diskover/diskover-bot-launcher.sh ${DISKOVER_ARRAY[WORKER_OPTS]} +# Start crawler echo "starting crawler with following options: ${DISKOVER_ARRAY[DISKOVER_OPTS]}" /usr/bin/python3 ./diskover.py ${DISKOVER_ARRAY[DISKOVER_OPTS]}