Browse Source

HOT-FIX: fix docker entrypoint script

pull/2439/head
Edward Ribeiro 6 years ago
parent
commit
b4b6d735fb
  1. 2
      sapl/settings.py
  2. 13
      start.sh

2
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,
},
}

13
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..."

Loading…
Cancel
Save