youtube-cli/web/server/gunicorn.conf.py
Jarian Cottingham 3c5b10466a chore: clean repo for public release
- Remove runtime artifacts (app.log, .DS_Store, committed home dir data)
- Remove AI session notes (prompt.md, agent.md, LOGGING_*.md)
- Move TUI.md, structure.md, docker-setup.md to docs/
- Normalize author metadata to Jarian Cottingham
- Fix hardcoded personal paths in gunicorn config and manual test script
- Pin textual <2.0 (8.x grid layout breaks TUI rendering)
- Fix stale tests: private attr access, missing screen push
- Add CI workflow (ruff + pytest, Python 3.10-3.12)
2026-08-20 21:03:50 +00:00

37 lines
878 B
Python

"""Gunicorn configuration for YouTube Web Server."""
import os
# Server binding
bind = f"0.0.0.0:{os.environ.get('PORT', 4096)}"
# Worker configuration - use gthread for threading-based SocketIO
worker_class = "gthread"
workers = 1
# Thread configuration
threads = 4
# Timeout configuration
timeout = 120
graceful_timeout = 60
# Logging - use stdout/stderr in Docker, files locally
import os
if os.environ.get('DOCKER'):
accesslog = "-"
errorlog = "-"
loglevel = "info"
else:
log_dir = os.environ.get("GUNICORN_LOG_DIR", os.path.dirname(os.path.abspath(__file__)))
accesslog = os.path.join(log_dir, "gunicorn-access.log")
errorlog = os.path.join(log_dir, "gunicorn-error.log")
loglevel = "debug"
# Process naming
proc_name = "youtube-web-server"
# Preload app - disabled as it causes yt-dlp C extension issues after fork
preload_app = False