fix: audit remediation Wave 3 — M-1, MED/LOW sweep, ingest robustness + D-1 close-out #14
@@ -5,6 +5,12 @@
|
|||||||
# Example: postgresql://researcher:change_me@localhost:5432/papers
|
# Example: postgresql://researcher:change_me@localhost:5432/papers
|
||||||
DATABASE_URL=postgresql://researcher:change_me@localhost:5432/papers
|
DATABASE_URL=postgresql://researcher:change_me@localhost:5432/papers
|
||||||
|
|
||||||
|
# Optional: privileged connection used by `codex migrate` to apply schema DDL.
|
||||||
|
# The app DATABASE_URL is often a least-privilege DML role that cannot CREATE/
|
||||||
|
# ALTER owner-held tables; point this at an owner/superuser connection.
|
||||||
|
# Falls back to DATABASE_URL when unset.
|
||||||
|
# MIGRATION_DATABASE_URL=postgresql://postgres:change_me@localhost:5432/papers
|
||||||
|
|
||||||
# GROBID service base URL (containerised — see infra/docker-compose.yml)
|
# GROBID service base URL (containerised — see infra/docker-compose.yml)
|
||||||
GROBID_URL=http://localhost:8070
|
GROBID_URL=http://localhost:8070
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -19,13 +19,11 @@ $EDITOR .env
|
|||||||
# 3. Install Python dependencies (requires uv)
|
# 3. Install Python dependencies (requires uv)
|
||||||
uv sync
|
uv sync
|
||||||
|
|
||||||
# 4. Apply the database schema (first run only)
|
# 4. Apply the database schema (idempotent — safe to re-run after upgrades)
|
||||||
uv run python -c "
|
# Needs a role that can run DDL. If DATABASE_URL is a least-privilege app
|
||||||
from codex.db import get_conn, apply_schema
|
# role, point MIGRATION_DATABASE_URL at an owner/superuser connection first:
|
||||||
with get_conn() as conn:
|
# MIGRATION_DATABASE_URL=postgresql://postgres:...@host:5432/papers
|
||||||
apply_schema(conn)
|
uv run codex migrate
|
||||||
print('Schema applied.')
|
|
||||||
"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -34,7 +32,8 @@ print('Schema applied.')
|
|||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `DATABASE_URL` | `postgresql://researcher:change_me@localhost:5432/papers` | libpq connection string |
|
| `DATABASE_URL` | `postgresql://researcher:change_me@localhost:5432/papers` | libpq connection string (app role; DML) |
|
||||||
|
| `MIGRATION_DATABASE_URL` | *(falls back to `DATABASE_URL`)* | Privileged connection used by `codex migrate` for schema DDL (owner/superuser) |
|
||||||
| `GROBID_URL` | `http://localhost:8070` | GROBID HTTP API base URL |
|
| `GROBID_URL` | `http://localhost:8070` | GROBID HTTP API base URL |
|
||||||
| `OLLAMA_BASE_URL` | `http://localhost:11434` | Local Ollama endpoint (optional) |
|
| `OLLAMA_BASE_URL` | `http://localhost:11434` | Local Ollama endpoint (optional) |
|
||||||
| `EMBEDDING_MODEL` | `BAAI/bge-m3` | sentence-transformers model name |
|
| `EMBEDDING_MODEL` | `BAAI/bge-m3` | sentence-transformers model name |
|
||||||
|
|||||||
Reference in New Issue
Block a user