mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 09:26:42 +02:00
feat(search): implement mana-search microservice
Central search microservice for all ManaCore apps featuring: - NestJS API on port 3021 - SearXNG meta-search engine integration (40+ search engines) - Redis caching layer for search results and extracted content - Content extraction with markdown conversion - Prometheus metrics for monitoring API Endpoints: - POST /api/v1/search - Web search with categories/engines - POST /api/v1/extract - Content extraction from URLs - POST /api/v1/extract/bulk - Bulk extraction - GET /health - Health check - GET /metrics - Prometheus metrics Search categories: general, news, science, it, images, videos Supported engines: Google, Bing, DuckDuckGo, Wikipedia, arXiv, GitHub, StackOverflow, and many more. https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
This commit is contained in:
parent
590529c547
commit
bd72b4d6d5
35 changed files with 2219 additions and 0 deletions
58
services/mana-search/docker-compose.dev.yml
Normal file
58
services/mana-search/docker-compose.dev.yml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
version: '3.8'
|
||||
|
||||
# Development setup - SearXNG and Redis only
|
||||
# Run mana-search with `pnpm dev` locally
|
||||
|
||||
services:
|
||||
# ================================
|
||||
# SearXNG Meta Search Engine
|
||||
# ================================
|
||||
searxng:
|
||||
image: searxng/searxng:latest
|
||||
container_name: mana-searxng-dev
|
||||
ports:
|
||||
- "8080:8080" # Exposed for development
|
||||
volumes:
|
||||
- ./searxng/settings.yml:/etc/searxng/settings.yml:ro
|
||||
- ./searxng/limiter.toml:/etc/searxng/limiter.toml:ro
|
||||
environment:
|
||||
SEARXNG_BASE_URL: http://localhost:8080
|
||||
SEARXNG_SECRET: dev-secret-change-in-production
|
||||
networks:
|
||||
- mana-search-dev
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
|
||||
# ================================
|
||||
# Redis Cache
|
||||
# ================================
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: mana-search-redis-dev
|
||||
ports:
|
||||
- "6380:6379" # Different port to avoid conflicts
|
||||
command: redis-server --appendonly yes --maxmemory 64mb --maxmemory-policy allkeys-lru
|
||||
volumes:
|
||||
- redis-dev-data:/data
|
||||
networks:
|
||||
- mana-search-dev
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
redis-dev-data:
|
||||
name: mana-search-redis-dev-data
|
||||
|
||||
networks:
|
||||
mana-search-dev:
|
||||
name: mana-search-dev
|
||||
driver: bridge
|
||||
Loading…
Add table
Add a link
Reference in a new issue