Browse Source

Ajusta busy-wait para verificar a DATABASE_URL genérica(Variável de Ambiente) e altera número de cores do gunicorn_start.sh para 9

pull/802/merge
Matheus Veleci 8 years ago
committed by Edward Ribeiro
parent
commit
ee1b73b9c8
  1. 2
      busy-wait.sh
  2. 2
      gunicorn_start.sh
  3. 2
      start.sh

2
busy-wait.sh

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
while true; do while true; do
COUNT_PG=`psql --dbname=postgresql://sapl:sapl@sapldb/sapl -c '\l \q' | grep sapl | wc -l` COUNT_PG=`psql $1 -c '\l \q' | grep sapl | wc -l`
if ! [ "$COUNT_PG" -eq "0" ]; then if ! [ "$COUNT_PG" -eq "0" ]; then
break break
fi fi

2
gunicorn_start.sh

@ -16,7 +16,7 @@ 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 (*)
USER=`whoami` # the user to run as (*) USER=`whoami` # the user to run as (*)
GROUP=`whoami` # the group to run as (*) GROUP=`whoami` # the group to run as (*)
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn (*) NUM_WORKERS=9 # how many worker processes should Gunicorn spawn (*)
# NUM_WORKERS = 2 * CPUS + 1 # NUM_WORKERS = 2 * CPUS + 1
DJANGO_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*) DJANGO_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*)
DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*)

2
start.sh

@ -44,7 +44,7 @@ create_env
python3 manage.py bower install python3 manage.py bower install
/bin/sh busy-wait.sh /bin/sh busy-wait.sh $DATABASE_URL
python3 manage.py migrate python3 manage.py migrate
python3 manage.py collectstatic --no-input python3 manage.py collectstatic --no-input

Loading…
Cancel
Save