Browse Source

Modifica scripts para voltar diretório padrão do gunicorn

pull/1000/head
Edward Ribeiro 8 years ago
parent
commit
12a3d6995e
  1. 2
      docker-compose.yml
  2. 13
      gunicorn_start.sh

2
docker-compose.yml

@ -21,7 +21,7 @@ sapldb:
- "5532:5432"
web:
build: .
command: /bin/sh -c "/bin/sh busy-wait.sh && python3 manage.py bower install && python3 manage.py migrate && /bin/sh gunicorn_start.sh"
command: /bin/sh -c "/bin/sh busy-wait.sh && python3 manage.py bower install && python3 manage.py migrate && /bin/sh gunicorn_start.sh /sapl"
volumes:
- .:/sapl
links:

13
gunicorn_start.sh

@ -2,9 +2,18 @@
# As seen in http://tutos.readthedocs.org/en/latest/source/ndg.html
SAPL_DIR=/var/interlegis/sapl
# Seta um novo diretório foi passado como raiz para o SAPL
# caso esse tenha sido passado como parâmetro
if [ "$1" ]
then
SAPL_DIR="$1"
fi
NAME="SAPL" # Name of the application (*)
DJANGODIR=/sapl/ # Django project directory (*)
SOCKFILE=/sapl/run/gunicorn.sock # we will communicate using this unix socket (*)
DJANGODIR=$SAPL_DIR # Django project directory (*)
SOCKFILE=$SAPL_DIR/gunicorn.sock # we will communicate using this unix socket (*)
USER=`whoami` # the user to run as (*)
GROUP=`whoami` # the group to run as (*)
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn (*)

Loading…
Cancel
Save