From b4b6d735fbe10d0c334a6aa4daa5cc29be9a0ee0 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 21 Dec 2018 16:54:58 -0200 Subject: [PATCH] HOT-FIX: fix docker entrypoint script --- sapl/settings.py | 2 +- start.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sapl/settings.py b/sapl/settings.py index 0d6a452bc..dba421f72 100755 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -120,7 +120,7 @@ HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': SEARCH_BACKEND, SEARCH_URL[0]: SEARCH_URL[1], - 'BATCH_SIZE': 500, + 'BATCH_SIZE': 1000, 'TIMEOUT': 60, }, } diff --git a/start.sh b/start.sh index ab37fb86e..c3049adc3 100755 --- a/start.sh +++ b/start.sh @@ -36,7 +36,7 @@ create_env() { echo "EMAIL_SEND_USER = ""${EMAIL_HOST_USER-''}" >> $FILENAME echo "DEFAULT_FROM_EMAIL = ""${EMAIL_HOST_USER-''}" >> $FILENAME echo "SERVER_EMAIL = ""${EMAIL_HOST_USER-''}" >> $FILENAME - echo "USE_SOLR = ""${USER_SOLR-True}" >> $FILENAME + echo "USE_SOLR = ""${USE_SOLR-False}" >> $FILENAME echo "SOLR_COLLECTION = ""${SOLR_COLLECTION-'sapl'}" >> $FILENAME echo "SOLR_URL = ""${SOLR_URL-'http://saplsolr:8983'}" >> $FILENAME @@ -52,19 +52,18 @@ create_env ## SOLR -NUM_SHARDS=""${NUM_SHARDS-1}" -RF=""${RF-1}" -MAX_SHARDS_PER_NODE=""${MAX_SHARDS_PER_NODE-1}" +NUM_SHARDS=${NUM_SHARDS:=1} +RF=${RF:=1} +MAX_SHARDS_PER_NODE=${MAX_SHARDS_PER_NODE:=1} -# Verifica se a variável USE_SOLR foi definida e é igual a True -if [[ ! -z "$USE_SOLR" ]] && [[ "$USE_SOLR" = "True" ]]; then +if [ "${USE_SOLR-False}" == "True" ]; then python3 solr_api.py -u $SOLR_URL -c $SOLR_COLLECTION -s $NUM_SHARDS -rf $RF -ms $MAX_SHARDS_PER_NODE & # python3 manage.py rebuild_index --noinput & fi # manage.py migrate --noinput nao funcionava yes yes | python3 manage.py migrate -#python3 manage.py collectstatic --no-input +# python3 manage.py collectstatic --no-input echo "Criando usuário admin..."