Browse Source

Revert "Update gunicorn_start.sh (#3312)"

This reverts commit ce5f04374b.
pull/3321/head
eribeiro 4 years ago
parent
commit
e083317c36
  1. 14
      docker/gunicorn_start.sh

14
docker/gunicorn_start.sh

@ -11,9 +11,6 @@ then
SAPL_DIR="$1" SAPL_DIR="$1"
fi fi
#Carrega as variáveis de ambiente
export $(egrep -v '^#' $SAPL_DIR/sapl/.env | xargs)
NAME="SAPL" # Name of the application (*) NAME="SAPL" # Name of the application (*)
DJANGODIR=/var/interlegis/sapl/ # Django project directory (*) DJANGODIR=/var/interlegis/sapl/ # Django project directory (*)
SOCKFILE=/var/interlegis/sapl/run/gunicorn.sock # we will communicate using this unix socket (*) SOCKFILE=/var/interlegis/sapl/run/gunicorn.sock # we will communicate using this unix socket (*)
@ -28,17 +25,6 @@ DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*)
echo "Starting $NAME as `whoami` on base dir $SAPL_DIR" echo "Starting $NAME as `whoami` on base dir $SAPL_DIR"
# Ativa ambiente virtual
cd $DJANGODIR
if [ "$SAPL_VIRTUAL_ENV" ]
then
source $SAPL_VIRTUAL_ENV/bin/activate
else
source /var/interlegis/.virtualenvs/sapl/bin/activate
fi
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
# Create the run directory if it doesn't exist # Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE) RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR test -d $RUNDIR || mkdir -p $RUNDIR

Loading…
Cancel
Save