bugfix gateway problems: gunicorn must bind to "django:8000"

pull/30/head
JensDiemer 2020-11-23 18:05:02 +01:00
rodzic fee696d509
commit 09aa738a2c
2 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -30,18 +30,13 @@ else
)
fi
GUNICORN_CMD_ARGS=<<'EOF'
--config /django/gunicorn.conf.py
--bind "$(hostname):8000"
EOF
(
set -x
./manage.py collectstatic --noinput
./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: $?"
sleep 3

Wyświetl plik

@ -4,6 +4,8 @@
import multiprocessing
bind = 'django:8000'
# https://docs.gunicorn.org/en/latest/settings.html#workers
workers = multiprocessing.cpu_count() * 2 + 1