diff --git a/docker/uwsgi.ts_proxy.ini b/docker/uwsgi.ts_proxy.ini new file mode 100644 index 00000000..e5adf8e3 --- /dev/null +++ b/docker/uwsgi.ts_proxy.ini @@ -0,0 +1,37 @@ +[uwsgi] +# Base configuration +chdir = /app +virtualenv = /dispatcharrpy +env = DJANGO_SETTINGS_MODULE=dispatcharr.settings + +# TS Proxy specific - SINGLE PROCESS, NO WORKERS +master = true +module = dispatcharr.wsgi:application +processes = 1 +workers = 1 +threads = 1 +enable-threads = true + +# Listen on a dedicated port +http = 0.0.0.0:9192 +http-keepalive = 1 + +# Optimize for streaming +http-timeout = 3600 # 1 hour streaming timeout +socket-timeout = 3600 +harakiri = 3600 +buffer-size = 262144 # 256KB buffer +post-buffering = 0 # Disable post buffering for streams +thunder-lock = true # Process lock for better stability +so-keepalive = true # Enable TCP keepalive + +# Prevent auto-restart during streaming +max-requests = 0 # Don't restart after X requests +worker-reload-mercy = 30 +ignore-sigpipe = true +ignore-write-errors = true +disable-write-exception = true + +# Route handling - only handle proxy routes +route = ^/proxy/ts/ continue: +route = .* break:404 \ No newline at end of file