File size: 685 Bytes
cf5e005
9513328
cf5e005
3cf0daf
cf5e005
 
 
 
9513328
 
 
 
 
 
9175ad9
cf5e005
67b1298
cf5e005
9513328
 
 
 
 
cf5e005
9513328
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""RMI Backend — root entry point.

Minimal — delegates everything to app.factory.create_app().

Per v4.0 §T01 + modern factory pattern:
- main.py is the entry point ONLY
- All composition lives in app/factory.py
- Goal: <30 lines, single import, single uvicorn call

Run: `python -u main.py` (CMD in Dockerfile)
"""
from __future__ import annotations

import os

from app.factory import create_app

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(
        "main:app",
        host=os.getenv("HOST", "0.0.0.0"),
        port=int(os.getenv("PORT", "8000")),
        log_level=os.getenv("LOG_LEVEL", "info").lower(),
        access_log=True,
    )