modify LANGFLOW_DATABASE_URL

This commit is contained in:
nsxshota 2023-11-23 11:24:56 +09:00
commit 2b2d8f3a87
2 changed files with 9 additions and 8 deletions

View file

@ -1,6 +1,7 @@
import platform
import socket
import sys
import os
import time
import webbrowser
from pathlib import Path
@ -128,11 +129,11 @@ def run(
dev: bool = typer.Option(False, help="Run in development mode (may contain bugs)"),
# This variable does not work but is set by the .env file
# and works with Pydantic
# database_url: str = typer.Option(
# None,
# help="Database URL to connect to. If not provided, a local SQLite database will be used.",
# envvar="LANGFLOW_DATABASE_URL",
# ),
database_url: str = typer.Option(
"mysql+pymysql://{}:{}@{}:3306/{}".format(os.environ["username"],os.environ["password"],os.environ["host"],os.environ["dbname"]),
help="Database URL to connect to. If not provided, a local SQLite database will be used.",
envvar="LANGFLOW_DATABASE_URL",
),
path: str = typer.Option(
None,
help="Path to the frontend directory containing build files. This is for development purposes only.",