Added new uwsgi for proxy.

This commit is contained in:
SergeantPanda 2025-03-08 15:36:01 -06:00
parent 1d40381860
commit 2d04f2c159

37
docker/uwsgi.ts_proxy.ini Normal file
View file

@ -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