first commit

This commit is contained in:
root
2026-05-19 13:43:37 +00:00
commit 9dcd0abd7d
107 changed files with 33622 additions and 0 deletions

15
gunicorn.conf.py Normal file
View File

@@ -0,0 +1,15 @@
from __future__ import annotations
import os
from pathlib import Path
import gunicorn.http.wsgi
gunicorn.http.wsgi.SERVER = "pyTorrent"
# Note: Gunicorn writes to data/logs by default; pyTorrent also writes rotated app/access/error logs there.
_log_dir = Path(os.getenv("PYTORRENT_LOG_DIR", "data/logs"))
_log_dir.mkdir(parents=True, exist_ok=True)
accesslog = os.getenv("PYTORRENT_GUNICORN_ACCESS_LOG", str(_log_dir / "gunicorn-access.log"))
errorlog = os.getenv("PYTORRENT_GUNICORN_ERROR_LOG", str(_log_dir / "gunicorn-error.log"))
loglevel = os.getenv("PYTORRENT_GUNICORN_LOG_LEVEL", "info")