ЛР3 на 3

Co-authored-by: Югай Артур Рустамович <f1ekserr@yandex.ru>
This commit is contained in:
2026-11-16 22:23:04 +03:00
co-authored by Югай Артур Рустамович
parent 0ab3a341aa
commit 09aece58fe
37 changed files with 2651 additions and 35 deletions
+21
View File
@@ -0,0 +1,21 @@
import logging
import os
import uvicorn
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s")
logging.getLogger("messenger").info("environment=%s", os.environ.get("APP_ENV", "lab"))
port = int(os.environ.get("APP_PORT", "8080"))
if not 1 <= port <= 65535:
raise SystemExit("APP_PORT должен быть от 1 до 65535")
uvicorn.run(
"src.app:create_app",
factory=True,
host=os.environ.get("APP_HOST", "0.0.0.0"),
port=port,
workers=1,
access_log=False,
timeout_graceful_shutdown=2,
)