M3: search — SearXNG container, searcher service, orchestrator /search
- searcher: file-based instance list (mtime-reloaded, hand-editable), failover across instances, URL normalization + dedup, Redis search cache (300s TTL) - searxng: pinned settings.yml with JSON format enabled and limiter disabled, secret from SEARXNG_SECRET env; wired into compose with config volume - orchestrator: /search proxying the searcher with per-stage trace; searcher included in aggregated /health Verified against a mock SearXNG: failover past a dead instance, dedup of trailing-slash duplicates, non-http URL filtering, cache miss/hit flags. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
56e7fa16dd
commit
53f0d50e7a
10 changed files with 298 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ services:
|
|||
REDIS_URL: redis://redis:6379
|
||||
EXTRACT_CACHE_TTL: ${EXTRACT_CACHE_TTL:-3600}
|
||||
depends_on:
|
||||
- searcher
|
||||
- renderer
|
||||
- extractor
|
||||
- redis
|
||||
|
|
@ -19,6 +20,31 @@ services:
|
|||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
searcher:
|
||||
build: services/searcher
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379
|
||||
SEARCH_CACHE_TTL: ${SEARCH_CACHE_TTL:-300}
|
||||
INSTANCES_FILE: /config/instances.yml
|
||||
volumes:
|
||||
- ./config:/config:ro
|
||||
depends_on:
|
||||
- searxng
|
||||
- redis
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8001/health')"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
searxng:
|
||||
image: searxng/searxng:latest
|
||||
environment:
|
||||
SEARXNG_SECRET: ${SEARXNG_SECRET:-change-me-lwss-internal}
|
||||
SEARXNG_BASE_URL: http://searxng:8080/
|
||||
volumes:
|
||||
- ./searxng:/etc/searxng:ro
|
||||
|
||||
renderer:
|
||||
build: services/renderer
|
||||
environment:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue