From 121ece570276e0120efd17e4f0f3f6074ecb19fd Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 28 Feb 2026 11:22:52 +0000 Subject: [PATCH] fix: add __main__ entrypoint to api-gateway so it starts under python -m Without this block, `python -m services.api_gateway.main` just imports the module and exits with code 0, causing CrashLoopBackOff. --- services/api_gateway/main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/api_gateway/main.py b/services/api_gateway/main.py index ec11e0e..f8e75e4 100644 --- a/services/api_gateway/main.py +++ b/services/api_gateway/main.py @@ -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, + )