fix: ASGI run & ports fix

This commit is contained in:
Piotr Dec 2025-10-16 21:33:25 +02:00
parent 1eab4cd6fc
commit 876b333397
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0
4 changed files with 13 additions and 7 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
*.iml *.iml
uv.lock uv.lock
**/*.kdbx* **/*.kdbx*
.compose_repository
__pycache__/ __pycache__/
**/dist/ **/dist/

View file

@ -8,7 +8,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class AppConfig(BaseModel): class AppConfig(BaseModel):
host: str = "127.0.0.1" host: str = "127.0.0.1"
port: int = 8000 port: int = 8081
reload: bool = True reload: bool = True

View file

@ -1,7 +1,7 @@
import logging import logging
from injectable import load_injection_container
from fastapi import FastAPI from fastapi import FastAPI
from injectable import load_injection_container
from app.config import get_settings from app.config import get_settings
from app.core.core import WebhookProcessor from app.core.core import WebhookProcessor
@ -9,13 +9,18 @@ from app.util.logging import LoggingHandler, ExternalLoggingHandler
class KarlApplication: class KarlApplication:
from starlette.types import Receive, Scope, Send
def __init__(self) -> None: def __init__(self) -> None:
self._set_logging() self._set_logging()
app = FastAPI(title="Karl", version="0.1.0") _app = FastAPI(title="Karl", version="0.1.0")
self._set_routes(app) self._set_routes(_app)
self._set_events(app) self._set_events(_app)
self._init_services() self._init_services()
pass
self._app = _app
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
await self._app.__call__(scope, receive, send)
def _set_logging(self): def _set_logging(self):
logging.basicConfig(level=logging.INFO, handlers=[LoggingHandler()]) logging.basicConfig(level=logging.INFO, handlers=[LoggingHandler()])

View file

@ -1,6 +1,6 @@
app: app:
host: "127.0.0.1" host: "127.0.0.1"
port: 8000 port: 8081
reload: true reload: true
git: git:
path: "F:/IdeaProjects/paas/karl/.compose_repository" path: "F:/IdeaProjects/paas/karl/.compose_repository"