From: Trenton Holmes Date: Wed, 31 Aug 2022 17:59:55 +0000 (-0700) Subject: Tweaks gunicorn to preload the app and use shared memory for temporary fs X-Git-Tag: v1.9.0-beta.rc1~12^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1500%2Fhead;p=thirdparty%2Fpaperless-ngx.git Tweaks gunicorn to preload the app and use shared memory for temporary fs --- diff --git a/gunicorn.conf.py b/gunicorn.conf.py index daebd4bea3..a3ada7a645 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -1,9 +1,17 @@ import os +# See https://docs.gunicorn.org/en/stable/settings.html for +# explanations of settings + bind = f'{os.getenv("PAPERLESS_BIND_ADDR", "[::]")}:{os.getenv("PAPERLESS_PORT", 8000)}' + workers = int(os.getenv("PAPERLESS_WEBSERVER_WORKERS", 1)) worker_class = "paperless.workers.ConfigurableWorker" timeout = 120 +preload_app = True + +# https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod +worker_tmp_dir = "/dev/shm" def pre_fork(server, worker):