Files
codex-py/.env.example
Tarik Moussa ae5e9a528b docs: document 'codex migrate' + MIGRATION_DATABASE_URL as the schema-sync path
README step 4 used an inline apply_schema over the app DATABASE_URL, which fails
under the privilege model (least-privilege app role cannot run DDL). Replace it
with 'codex migrate' and document MIGRATION_DATABASE_URL (owner/superuser) in the
README env table and .env.example, so the privileged migrate path is the
standard for future schema upgrades.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-15 16:20:54 +02:00

41 lines
1.8 KiB
Plaintext

# Copy this file to .env and fill in your values.
# Never commit .env to version control.
# PostgreSQL connection string (psycopg / asyncpg format)
# Example: 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_URL=http://localhost:8070
# Ollama base URL for optional local LLM Q&A layer
OLLAMA_BASE_URL=http://localhost:11434
# Sentence-transformers model for dense embeddings.
# BGE-M3 (BAAI/bge-m3) produces 1024-dimensional vectors and supports
# dense + sparse (hybrid) retrieval. Change together with EMBEDDING_DIM.
EMBEDDING_MODEL=BAAI/bge-m3
# Dimension of the embedding vectors. Must match EMBEDDING_MODEL output.
# BGE-M3 = 1024 | Jina v4 = 2048 | Qwen3-Embedding-0.6B = 1024
EMBEDDING_DIM=1024
# E-mail address for the OpenAlex Polite Pool (faster rate limits).
# Required by OpenAlex ToS when making automated requests.
OPENALEX_MAILTO=you@example.com
# Nougat HTTP-Server (Jetson: http://192.168.178.103:8080 | lokal: http://localhost:8080)
# Used by `codex ingest <id> --rich` for full-PDF Mathpix Markdown output.
NOUGAT_URL=http://localhost:8080
# F-16 Chunk Quality Gate thresholds (all optional — defaults shown)
CHUNK_MIN_CHARS=60 # Discard chunks shorter than this many characters
CHUNK_MIN_ALPHA_RATIO=0.40 # Discard chunks with < 40% alphabetic characters
CHUNK_MAX_BIB_SCORE=0.70 # Discard chunks scoring above this bibliography threshold