Browse Source

HOT-FIX: muda interpreter para BASH

pull/2439/head 3.1.139
Edward Ribeiro 6 years ago
parent
commit
fecf9ca048
  1. 2
      Dockerfile
  2. 19
      start.sh

2
Dockerfile

@ -3,7 +3,7 @@ FROM alpine:3.8
ENV BUILD_PACKAGES postgresql-dev graphviz-dev graphviz build-base git pkgconfig \
python3-dev libxml2-dev jpeg-dev libressl-dev libffi-dev libxslt-dev \
nodejs npm py3-lxml py3-magic postgresql-client poppler-utils antiword \
curl jq openssh-client vim openssh-client
curl jq openssh-client vim openssh-client bash
RUN apk update --update-cache && apk upgrade

19
start.sh

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
create_env() {
echo "[ENV FILE] creating .env file..."
@ -48,17 +48,32 @@ create_env
#python3 manage.py bower install
/bin/sh busy-wait.sh $DATABASE_URL
/bin/bash busy-wait.sh $DATABASE_URL
## SOLR
USE_SOLR="${USE_SOLR:=False}"
SOLR_URL="${SOLR_URL:='http://saplsolr:8983'}"
SOLR_COLLECTION="${SOLR_COLLECTION:='sapl_$RANDOM'}"
NUM_SHARDS=${NUM_SHARDS:=1}
RF=${RF:=1}
MAX_SHARDS_PER_NODE=${MAX_SHARDS_PER_NODE:=1}
if [ "${USE_SOLR-False}" == "True" ]; then
echo "SOLR configurations"
echo "==================="
echo "URL: $SOLR_URL"
echo "COLLECTION: $SOLR_COLLECTION"
echo "NUM_SHARDS: $NUM_SHARDS"
echo "REPLICATION FACTOR: $RF"
echo "MAX SHARDS PER NODE: $MAX_SHARDS_PER_NODE"
echo "========================================="
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 &
else
echo "Suporte a SOLR não inicializado."
fi
# manage.py migrate --noinput nao funcionava

Loading…
Cancel
Save