kopia lustrzana https://github.com/jedie/PyInventory
bugfix gateway problems: gunicorn must bind to "django:8000"
rodzic
fee696d509
commit
09aa738a2c
|
@ -30,18 +30,13 @@ else
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GUNICORN_CMD_ARGS=<<'EOF'
|
|
||||||
--config /django/gunicorn.conf.py
|
|
||||||
--bind "$(hostname):8000"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
./manage.py collectstatic --noinput
|
./manage.py collectstatic --noinput
|
||||||
./manage.py migrate
|
./manage.py migrate
|
||||||
|
|
||||||
su django -c "/usr/local/bin/gunicorn wsgi"
|
su django -c "/usr/local/bin/gunicorn --config /django/gunicorn.conf.py wsgi"
|
||||||
|
|
||||||
echo "gunicorn terminated with exit code: $?"
|
echo "gunicorn terminated with exit code: $?"
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
|
|
||||||
|
bind = 'django:8000'
|
||||||
|
|
||||||
# https://docs.gunicorn.org/en/latest/settings.html#workers
|
# https://docs.gunicorn.org/en/latest/settings.html#workers
|
||||||
workers = multiprocessing.cpu_count() * 2 + 1
|
workers = multiprocessing.cpu_count() * 2 + 1
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue