Copy gunicorn.conf.py

This commit is contained in:
Oliver Walters 2021-04-01 20:38:18 +11:00
parent 839c29117d
commit 148600a9c4
3 changed files with 10 additions and 1 deletions

View File

@ -84,4 +84,7 @@ RUN mkdir /home/inventree/media /home/inventree/static /home/inventree/log /home
# Copy supervisor file
COPY docker/supervisor.conf /etc/supervisord.conf
# Copy gunicorn config file
COPY docker/gunicorn.conf.py /home/inventree/gunicorn.conf.py
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

6
docker/gunicorn.conf.py Normal file
View File

@ -0,0 +1,6 @@
import multiprocessing
workers = multiprocessing.cpu_count() * 2 + 1
max_requests = 1000
max_requests_jitter = 50

View File

@ -18,7 +18,7 @@ nodaemon=true
[program:inventree-server]
user=inventree
directory=/home/inventree/src/InvenTree
command=/home/inventree/env/bin/gunicorn -c gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:%(INVENTREE_PORT)s
command=/home/inventree/env/bin/gunicorn -c /home/inventree/gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:%(ENV_INVENTREE_PORT)s
startsecs=10
autostart=true
autorestart=true