docs(readme): add Database backend section in Quick Start
Quick Start 加 Step 3 "Database backend (Stage 0+ defaults to Postgres)": - 说明 config.example.yaml 默认 postgres + DATABASE_URL 写 .env - 给本地 dev 起 docker compose postgres 一行命令 - 提示 make doctor / make dev preflight 行为 - <details> 折叠 SQLite fallback 说明(offline dev 用) Stage 0 PR2 T2.9(README 部分;backend/CLAUDE.md follow-up)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -202,6 +202,38 @@ That prompt is intended for coding agents. It tells the agent to clone the repo
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
3. **Database backend (Stage 0+ defaults to Postgres)**
|
||||||
|
|
||||||
|
`config.example.yaml` ships with `database.backend: postgres` and `postgres_url: $DATABASE_URL`. Set `DATABASE_URL` in `.env`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DATABASE_URL=postgresql+asyncpg://deerflow:deerflow_dev@localhost:5432/deerflow
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the local Postgres dev container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker/docker-compose-dev.yaml up -d postgres
|
||||||
|
```
|
||||||
|
|
||||||
|
Or point `DATABASE_URL` at a remote RDS / Cloud SQL instance.
|
||||||
|
|
||||||
|
`make doctor` will report the configured backend, attempt an asyncpg connection, and surface actionable fix hints. `make dev` preflights Postgres reachability before starting services and aborts if `DATABASE_URL` is unreachable.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Offline dev (SQLite fallback)</summary>
|
||||||
|
|
||||||
|
If you prefer no Postgres, edit `config.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
database:
|
||||||
|
backend: sqlite
|
||||||
|
sqlite_dir: .deer-flow/data
|
||||||
|
```
|
||||||
|
|
||||||
|
SQLite is preserved as a valid backend for offline development. RLS / multi-node features (Stage 2+) require Postgres.
|
||||||
|
</details>
|
||||||
|
|
||||||
### Running the Application
|
### Running the Application
|
||||||
|
|
||||||
#### Deployment Sizing
|
#### Deployment Sizing
|
||||||
|
|||||||
Reference in New Issue
Block a user