first commit
This commit is contained in:
18
backend/run_prod.py
Normal file
18
backend/run_prod.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from waitress import serve
|
||||
|
||||
from app.main import app
|
||||
from app.core_settings import get_settings
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
settings = get_settings()
|
||||
try:
|
||||
threads = int(os.getenv("WAITRESS_THREADS", "8"))
|
||||
except (TypeError, ValueError):
|
||||
threads = 8
|
||||
|
||||
serve(app, host=settings.host, port=settings.port, threads=threads)
|
||||
Reference in New Issue
Block a user