From 8f86a901c4b7a04ec09162c2347d9901cffe842f Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Thu, 22 Feb 2024 14:55:43 +0100 Subject: [PATCH] allow to inject root path through env var --- src/hayhooks/server/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hayhooks/server/app.py b/src/hayhooks/server/app.py index 1574297..b47734b 100644 --- a/src/hayhooks/server/app.py +++ b/src/hayhooks/server/app.py @@ -9,7 +9,10 @@ def create_app(): - app = FastAPI() + if root_path := os.environ.get("HAYHOOKS_ROOT_PATH"): + app = FastAPI(root_path=root_path) + else: + app = FastAPI() # Deploy all pipelines in the pipelines directory pipelines_dir = os.environ.get("HAYHOOKS_PIPELINES_DIR")