|
@ -36,7 +36,7 @@ create_env() { |
|
|
echo "EMAIL_SEND_USER = ""${EMAIL_HOST_USER-''}" >> $FILENAME |
|
|
echo "EMAIL_SEND_USER = ""${EMAIL_HOST_USER-''}" >> $FILENAME |
|
|
echo "DEFAULT_FROM_EMAIL = ""${EMAIL_HOST_USER-''}" >> $FILENAME |
|
|
echo "DEFAULT_FROM_EMAIL = ""${EMAIL_HOST_USER-''}" >> $FILENAME |
|
|
echo "SERVER_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_COLLECTION = ""${SOLR_COLLECTION-'sapl'}" >> $FILENAME |
|
|
echo "SOLR_URL = ""${SOLR_URL-'http://saplsolr:8983'}" >> $FILENAME |
|
|
echo "SOLR_URL = ""${SOLR_URL-'http://saplsolr:8983'}" >> $FILENAME |
|
|
|
|
|
|
|
@ -52,19 +52,18 @@ create_env |
|
|
|
|
|
|
|
|
## SOLR |
|
|
## SOLR |
|
|
|
|
|
|
|
|
NUM_SHARDS=""${NUM_SHARDS-1}" |
|
|
NUM_SHARDS=${NUM_SHARDS:=1} |
|
|
RF=""${RF-1}" |
|
|
RF=${RF:=1} |
|
|
MAX_SHARDS_PER_NODE=""${MAX_SHARDS_PER_NODE-1}" |
|
|
MAX_SHARDS_PER_NODE=${MAX_SHARDS_PER_NODE:=1} |
|
|
|
|
|
|
|
|
# Verifica se a variável USE_SOLR foi definida e é igual a True |
|
|
if [ "${USE_SOLR-False}" == "True" ]; then |
|
|
if [[ ! -z "$USE_SOLR" ]] && [[ "$USE_SOLR" = "True" ]]; then |
|
|
|
|
|
python3 solr_api.py -u $SOLR_URL -c $SOLR_COLLECTION -s $NUM_SHARDS -rf $RF -ms $MAX_SHARDS_PER_NODE & |
|
|
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 & |
|
|
# python3 manage.py rebuild_index --noinput & |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# manage.py migrate --noinput nao funcionava |
|
|
# manage.py migrate --noinput nao funcionava |
|
|
yes yes | python3 manage.py migrate |
|
|
yes yes | python3 manage.py migrate |
|
|
#python3 manage.py collectstatic --no-input |
|
|
# python3 manage.py collectstatic --no-input |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Criando usuário admin..." |
|
|
echo "Criando usuário admin..." |
|
|