]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Allows the webserver binding address to be configured via the environment 1358/head
authorTrenton Holmes <holmes.trenton@gmail.com>
Thu, 4 Aug 2022 14:43:23 +0000 (07:43 -0700)
committerTrenton Holmes <holmes.trenton@gmail.com>
Thu, 4 Aug 2022 14:43:23 +0000 (07:43 -0700)
docs/configuration.rst
gunicorn.conf.py

index fd68f61cbf91cdb8b70c4a909286d350ded3bfe2..dce6b3a83d8a8d37c7b63b40c4edf77e7b4deaed 100644 (file)
@@ -808,6 +808,13 @@ PAPERLESS_WEBSERVER_WORKERS=<num>
 
     Defaults to 1.
 
+PAPERLESS_BIND_ADDR=<ip address>
+    The IP address the webserver will listen on inside the container. There are
+    special setups where you may need to configure this value to restrict the
+    Ip address or interface the webserver listens on.
+
+    Defaults to [::], meaning all interfaces, including IPv6.
+
 PAPERLESS_PORT=<port>
     The port number the webserver will listen on inside the container. There are
     special setups where you may need this to avoid collisions with other
index 7193815b367da1bc1c73874f2bb8b28be8c852d7..daebd4bea33ff5de712e6f49d7115b176766b458 100644 (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