Browse Source

Recupera IP dinamico para rodar gunicorn simples

pull/294/head
Edward Ribeiro 9 years ago
parent
commit
cad8a138fe
  1. 5
      simple_gunicorn.sh

5
simple_gunicorn.sh

@ -7,4 +7,7 @@ source ~/.virtualenvs/sapl/bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
gunicorn --bind 10.1.2.119:8000 sapl.wsgi:application
# Get eth0 IP and filter out the netmask portion (/24, e.g.)
IP=`ip addr | grep 'inet .* eth0' | awk '{print $2}' | sed 's/\/[0-9]*//'`
gunicorn --bind $IP:8000 sapl.wsgi:application

Loading…
Cancel
Save