Use Gunicorn in Procfile for Render, add platform detection
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Use start_alwrity_backend.py for deployment
|
||||
# This script handles all bootstrap logic and starts uvicorn
|
||||
web: python start_alwrity_backend.py --production
|
||||
# Use Gunicorn with uvicorn worker for faster port binding on Render
|
||||
# Gunicorn binds immediately, then loads app in background
|
||||
web: gunicorn app:app --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT --timeout 600
|
||||
|
||||
@@ -9,10 +9,17 @@ import os
|
||||
import sys
|
||||
import json
|
||||
import argparse
|
||||
import platform
|
||||
from pathlib import Path
|
||||
from dataclasses import dataclass, asdict
|
||||
from typing import Optional
|
||||
|
||||
# Detect platform
|
||||
IS_WINDOWS = platform.system() == "Windows"
|
||||
IS_LINUX = platform.system() == "Linux"
|
||||
|
||||
import uvicorn
|
||||
|
||||
|
||||
@dataclass
|
||||
class BootstrapResult:
|
||||
|
||||
Reference in New Issue
Block a user