infoxtractor/.env.example
Dirk Riemann c7dc40c51e
All checks were successful
tests / test (push) Successful in 1m12s
tests / test (pull_request) Successful in 1m10s
fix(deploy): switch to network_mode: host — reach postgis + ollama on loopback
The shared postgis container is bound to 127.0.0.1 on the host (security
hardening, infrastructure §T12). Ollama is similarly LAN-hardened. The
previous `host.docker.internal + extra_hosts: host-gateway` approach
points at the bridge gateway IP, not loopback, so the container couldn't
reach either service.

Switch to `network_mode: host` (same pattern goldstein uses) and update
the default IX_POSTGRES_URL / IX_OLLAMA_URL to 127.0.0.1. Keep the GPU
reservation block; drop the now-meaningless ports: declaration (host mode
publishes directly).

AppConfig defaults + .env.example + test_config assertions + inline
docstring examples all follow.

Caught on fourth deploy attempt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 13:00:02 +02:00

41 lines
1.6 KiB
Text

# InfoXtractor runtime configuration.
# Every variable is optional; defaults are suitable for running against the
# on-prem stack (Ollama on :11434, postgis on :5431). Copy to .env and fill in
# the Postgres password.
# --- Job store -----------------------------------------------------------
IX_POSTGRES_URL=postgresql+asyncpg://infoxtractor:<password>@127.0.0.1:5431/infoxtractor
# --- LLM backend ---------------------------------------------------------
IX_OLLAMA_URL=http://127.0.0.1:11434
IX_DEFAULT_MODEL=qwen3:14b
# --- OCR -----------------------------------------------------------------
IX_OCR_ENGINE=surya
# --- Pipeline behavior ---------------------------------------------------
IX_PIPELINE_WORKER_CONCURRENCY=1
IX_PIPELINE_REQUEST_TIMEOUT_SECONDS=2700
IX_GENAI_CALL_TIMEOUT_SECONDS=1500
IX_RENDER_MAX_PIXELS_PER_PAGE=75000000
# --- File fetching -------------------------------------------------------
IX_TMP_DIR=/tmp/ix
IX_FILE_MAX_BYTES=52428800
IX_FILE_CONNECT_TIMEOUT_SECONDS=10
IX_FILE_READ_TIMEOUT_SECONDS=30
# --- Transport / callbacks ----------------------------------------------
IX_CALLBACK_TIMEOUT_SECONDS=10
# --- Observability -------------------------------------------------------
IX_LOG_LEVEL=INFO
# --- Test-only -----------------------------------------------------------
# Set IX_TEST_MODE=fake to have the pipeline factory build FakeOCRClient /
# FakeGenAIClient instead of real ones (used by integration tests).
# IX_TEST_MODE=fake
# Set IX_TEST_OLLAMA=1 on the Mac to enable tests that require a real
# Ollama / Surya instance (tests/live/).
# IX_TEST_OLLAMA=1