config: move default sqlite_dir to .deer-flow/data

Keep SQLite databases alongside other DeerFlow-managed data
(threads, memory) under the .deer-flow/ directory instead of a
top-level ./data folder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
rayhpeng
2026-04-03 11:31:22 +08:00
parent 2e4cb5c6a9
commit 14c5f4b798
2 changed files with 6 additions and 4 deletions
@@ -39,7 +39,7 @@ class DatabaseConfig(BaseModel):
description=("Storage backend for both checkpointer and application data. 'memory' for development (no persistence across restarts), 'sqlite' for single-node deployment, 'postgres' for production multi-node deployment."), description=("Storage backend for both checkpointer and application data. 'memory' for development (no persistence across restarts), 'sqlite' for single-node deployment, 'postgres' for production multi-node deployment."),
) )
sqlite_dir: str = Field( sqlite_dir: str = Field(
default="./data", default=".deer-flow/data",
description=("Directory for SQLite database files. Checkpointer uses {sqlite_dir}/checkpoints.db, application data uses {sqlite_dir}/app.db."), description=("Directory for SQLite database files. Checkpointer uses {sqlite_dir}/checkpoints.db, application data uses {sqlite_dir}/app.db."),
) )
postgres_url: str = Field( postgres_url: str = Field(
+5 -3
View File
@@ -584,21 +584,23 @@ memory:
# #
# Postgres mode: put your connection URL in .env as DATABASE_URL, # Postgres mode: put your connection URL in .env as DATABASE_URL,
# then reference it here with $DATABASE_URL. # then reference it here with $DATABASE_URL.
# Install the postgres driver: uv sync --extra postgres # Install the driver first:
# Local: uv sync --extra postgres
# Docker: UV_EXTRAS=postgres docker compose build
# #
# NOTE: When both `checkpointer` and `database` are configured, # NOTE: When both `checkpointer` and `database` are configured,
# `checkpointer` takes precedence for LangGraph state persistence. # `checkpointer` takes precedence for LangGraph state persistence.
# If you use `database`, you can remove the `checkpointer` section. # If you use `database`, you can remove the `checkpointer` section.
# database: # database:
# backend: sqlite # backend: sqlite
# sqlite_dir: ./data # sqlite_dir: .deer-flow/data
# #
# database: # database:
# backend: postgres # backend: postgres
# postgres_url: $DATABASE_URL # postgres_url: $DATABASE_URL
database: database:
backend: sqlite backend: sqlite
sqlite_dir: ./data sqlite_dir: .deer-flow/data
# ============================================================================ # ============================================================================
# Run Events Configuration # Run Events Configuration