mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
17 lines
508 B
Python
17 lines
508 B
Python
import os
|
|
|
|
if __name__ == "__main__":
|
|
from granian import Granian
|
|
from granian.constants import Interfaces
|
|
|
|
Granian(
|
|
"paperless.asgi:application",
|
|
interface=Interfaces.ASGI,
|
|
address=os.getenv("PAPERLESS_BIND_ADDR", "::"),
|
|
port=int(os.getenv("PAPERLESS_PORT", 8000)),
|
|
workers=int(os.getenv("PAPERLESS_WEBSERVER_WORKERS", 1)),
|
|
websockets=True,
|
|
# TODO, test this
|
|
url_path_prefix=os.getenv("PAPERLESS_FORCE_SCRIPT_NAME"),
|
|
).serve()
|