mirror of
https://github.com/smittix/intercept.git
synced 2026-06-20 03:14:21 -07:00
feat: add gunicorn + gevent production server via start.sh
Add start.sh as the recommended production entry point with: - gunicorn + gevent worker for concurrent SSE/WebSocket handling - CLI flags for port, host, debug, HTTPS, and dependency checks - Auto-fallback to Flask dev server if gunicorn not installed - Conditional gevent monkey-patch in app.py via INTERCEPT_USE_GEVENT env var - Docker CMD updated to use start.sh - Updated all docs, setup.sh, and requirements.txt accordingly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,15 @@ Flask application and shared state.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os as _os
|
||||
if _os.environ.get('INTERCEPT_USE_GEVENT') == '1':
|
||||
try:
|
||||
from gevent import monkey as _monkey
|
||||
_monkey.patch_all(subprocess=False)
|
||||
except ImportError:
|
||||
pass
|
||||
del _os
|
||||
|
||||
import sys
|
||||
import site
|
||||
|
||||
|
||||
Reference in New Issue
Block a user