feat: Customize DB path for JCloud app (#619)
This commit is contained in:
commit
c038247dcf
1 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,13 @@
|
|||
# This file is used by lc-serve to load the mounted app and serve it.
|
||||
|
||||
import os
|
||||
|
||||
# Use the JCLOUD_WORKSPACE for db URL if it's provided by JCloud.
|
||||
if 'JCLOUD_WORKSPACE' in os.environ:
|
||||
os.environ[
|
||||
'LANGFLOW_DATABASE_URL'
|
||||
] = f"sqlite:///{os.environ['JCLOUD_WORKSPACE']}/langflow.db"
|
||||
|
||||
from langflow.main import setup_app
|
||||
from langflow.utils.logger import configure
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue