Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ __pycache__/
venv/
venv_pptx2md/
.benchmarks/
.demo-originals/
.pytest_cache/
.ruff_cache/
.mypy_cache/
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,21 @@ full dependency matrix.
./deploy/local-dev/start-dev.sh
```

5. Start the API and worker in separate terminals:
5. Run migrations with the local management role. The infrastructure script
provisions `knowhere_runtime`; the API/Worker environment examples use that
non-superuser role so shared demo row-level security is enforced.

```bash
cd apps/api && uv run main.py
cd apps/worker && uv run worker.py
cd apps/api
MIGRATION_DATABASE_URL=postgresql+asyncpg://root:root123@localhost:5432/Knowhere \
uv run alembic upgrade heads
```

Run API migrations explicitly before starting the API when the database schema needs updating:
6. Start the API and worker in separate terminals:

```bash
cd apps/api
uv run alembic upgrade heads
cd apps/api && uv run main.py
cd apps/worker && uv run worker.py
```

For API-only development without the dashboard, create an API-only user/key
Expand Down
14 changes: 7 additions & 7 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TELEMETRY_ENABLED=true
# TELEMETRY_AGGREGATE_INTERVAL_SECONDS=300

# Required for local startup: database
DATABASE_URL=postgresql+asyncpg://root:root123@localhost:5432/Knowhere
DATABASE_URL=postgresql+asyncpg://knowhere_runtime:runtime123@localhost:5432/Knowhere
DB_SSL_MODE=disable
# DB_SSL_MODE options: disable, allow, prefer, require, verify-ca, verify-full
# DB_SSL_CERT=/path/to/client-cert.pem
Expand Down Expand Up @@ -136,12 +136,6 @@ MOESIF_APPLICATION_ID=
FREE_PLAN_INITIAL_CREDITS=5
FRONTEND_URL=http://localhost:3000

# Reuse canonical demo bundles; disable to restore per-job uploads while keeping
# existing canonical artifact URLs readable. Does not change publication strategy.
DEMO_CANONICAL_BUNDLE_ENABLED=false
# Optional per-process tokenization/frequency reuse for versioned demo sources.
DEMO_PUBLICATION_PREPARATION_CACHE_ENABLED=false

# Required for specific features: parsing providers
MINERU_API_KEYS=
ILOVEAPI_PUBLIC_KEY=
Expand All @@ -168,3 +162,9 @@ ENTITY_TYPES=person,location,organization

# Re-summarize detected page-track figures/charts/tables with numeric extraction
# (§4.3). Gated separately from detection for safe rollout; defaults off.

# Shared demo maintainers still require normal API write permission.
DEMO_MAINTAINER_USER_IDS=
# API/Worker DATABASE_URL must use NOSUPERUSER NOBYPASSRLS.
# Use a separate privileged role for migrations.
MIGRATION_DATABASE_URL=
Loading
Loading