Browse Source

HOT-FIX: permitir execução do SAPL docker e standalone

pull/802/merge
Edward Ribeiro 8 years ago
parent
commit
66a529b783
  1. 9
      gunicorn_start.sh
  2. 2
      start.sh

9
gunicorn_start.sh

@ -23,6 +23,15 @@ DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*)
echo "Starting $NAME as `whoami` on base dir $SAPL_DIR"
# parameter can be passed to run without virtualenv
if [[ "$@" != "no-venv" ]]; then
# Activate the virtual environment
cd $DJANGODIR
source /var/interlegis/.virtualenvs/sapl/bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
fi
# Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

2
start.sh

@ -50,4 +50,4 @@ python3 manage.py migrate
python3 manage.py collectstatic --no-input
python3 manage.py rebuild_index --noinput
/bin/sh gunicorn_start.sh
/bin/sh gunicorn_start.sh no-venv

Loading…
Cancel
Save