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
|
# Use Gunicorn with uvicorn worker for faster port binding on Render
|
||||||
# This script handles all bootstrap logic and starts uvicorn
|
# Gunicorn binds immediately, then loads app in background
|
||||||
web: python start_alwrity_backend.py --production
|
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 sys
|
||||||
import json
|
import json
|
||||||
import argparse
|
import argparse
|
||||||
|
import platform
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from dataclasses import dataclass, asdict
|
from dataclasses import dataclass, asdict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
# Detect platform
|
||||||
|
IS_WINDOWS = platform.system() == "Windows"
|
||||||
|
IS_LINUX = platform.system() == "Linux"
|
||||||
|
|
||||||
|
import uvicorn
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class BootstrapResult:
|
class BootstrapResult:
|
||||||
|
|||||||
Reference in New Issue
Block a user