Allows the webserver binding address to be configured via the environment

This commit is contained in:
Trenton Holmes 2022-08-04 07:43:23 -07:00
parent cb7e6f8cd0
commit ada8516803
2 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,6 @@
import os
bind = f'[::]:{os.getenv("PAPERLESS_PORT", 8000)}'
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