diff --git a/start.py b/start.py index 51cbc9c..68b7ee7 100644 --- a/start.py +++ b/start.py @@ -64,8 +64,12 @@ def start_daemon(): return print("🚀 Starting SexChat in background...") + gunicorn_bin = os.path.join(os.path.dirname(__file__), ".venv", "bin", "gunicorn") + if not os.path.exists(gunicorn_bin): + gunicorn_bin = "gunicorn" # fallback + cmd = [ - "gunicorn", + gunicorn_bin, "--worker-class", "eventlet", "-w", "1", "--bind", f"{_get_conf('HOST', '0.0.0.0')}:{_get_conf('PORT', 5000)}", @@ -120,8 +124,12 @@ def get_status(): def run_debug(): print("🛠️ Starting SexChat in DEBUG mode (foreground)...") + gunicorn_bin = os.path.join(os.path.dirname(__file__), ".venv", "bin", "gunicorn") + if not os.path.exists(gunicorn_bin): + gunicorn_bin = "gunicorn" # fallback + cmd = [ - "gunicorn", + gunicorn_bin, "--worker-class", "eventlet", "-w", "1", "--bind", f"{_get_conf('HOST', '0.0.0.0')}:{_get_conf('PORT', 5000)}",