fix: add __main__ entrypoint to api-gateway so it starts under python -m
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Without this block, `python -m services.api_gateway.main` just imports
the module and exits with code 0, causing CrashLoopBackOff.
This commit is contained in:
Viktor Barzin 2026-02-28 11:22:52 +00:00
parent e92cbc1bc4
commit 121ece5702
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -117,3 +117,14 @@ def create_app(config: ApiGatewayConfig | None = None) -> FastAPI:
def get_app() -> FastAPI:
"""Lazy app factory for uvicorn: ``uvicorn services.api_gateway.main:get_app --factory``."""
return create_app()
if __name__ == "__main__":
import uvicorn
uvicorn.run(
"services.api_gateway.main:get_app",
factory=True,
host="0.0.0.0",
port=8000,
)