Skip to content

Commit

Permalink
Add env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanrfrazier committed Jan 30, 2025
1 parent e9a7f0f commit 4daf87d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/base/langflow/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ def create_app():
from langflow.utils.version import get_version_info

__version__ = get_version_info()["version"]
root_path = os.environ.get("LANGFLOW_ROOT_PATH", "")
settings = get_settings_service().settings

configure()
lifespan = get_lifespan(version=__version__)
app = FastAPI(
lifespan=lifespan,
title="Langflow",
version=__version__,
root_path=root_path
root_path=settings.root_path
)

app.add_middleware(
Expand Down Expand Up @@ -223,7 +223,6 @@ async def flatten_query_string_lists(request: Request, call_next):

return await call_next(request)

settings = get_settings_service().settings
if prome_port_str := os.environ.get("LANGFLOW_PROMETHEUS_PORT"):
# set here for create_app() entry point
prome_port = int(prome_port_str)
Expand Down
3 changes: 3 additions & 0 deletions src/backend/base/langflow/services/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ class Settings(BaseSettings):
"""The maximum number of vertex builds to keep in the database."""
max_vertex_builds_per_vertex: int = 2
"""The maximum number of builds to keep per vertex. Older builds will be deleted."""
root_path: str = ""
"""The root path to serve requests at."""


# MCP Server
mcp_server_enabled: bool = True
Expand Down

0 comments on commit 4daf87d

Please sign in to comment.