feat(mana-search): rewrite search service from NestJS to Go

Replaces the NestJS mana-search service with a Go implementation for
lower resource usage and faster startup. All 7 API endpoints are 1:1
compatible (search, extract, bulk extract, engines, health, metrics,
cache clear). Uses go-readability for content extraction and
html-to-markdown for Markdown conversion. Redis cache with graceful
degradation, Prometheus metrics, and structured JSON logging.

Binary: 22 MB vs ~200+ MB node_modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-27 21:58:40 +01:00
parent c67ed0df14
commit 4b0f5a29fd
74 changed files with 1607 additions and 3594 deletions

View file

@ -302,16 +302,14 @@ services:
mana-search:
build:
context: .
dockerfile: services/mana-search/Dockerfile
dockerfile: services/mana-search-go/Dockerfile
image: mana-search:local
container_name: mana-core-search
restart: always
depends_on:
searxng:
condition: service_healthy
# Removed: redis - lazy connect
environment:
NODE_ENV: production
PORT: 3020
SEARXNG_URL: http://searxng:8080
SEARXNG_TIMEOUT: 15000
@ -326,11 +324,11 @@ services:
ports:
- "3020:3020"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3020/api/v1/health"]
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3020/health"]
interval: 120s
timeout: 10s
retries: 3
start_period: 40s
start_period: 5s
mana-media:
build: