Self-hosted Docker Compose stack for DGX Spark (ARM64/aarch64, CPU-only): - SearXNG on port 8889 with JSON API enabled, rate limiting off - Firecrawl (built from local source) on port 3002, no API key required - HHEM API (FastAPI + vectara/hallucination_evaluation_model) on port 8881 - Portainer stack YAML using dgx_net external network - build-images.sh to pre-build local images before Portainer deploy - HF model cache bind-mounted from /home/sparky/LLMs/huggingface Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
150 lines
4.2 KiB
YAML
150 lines
4.2 KiB
YAML
services:
|
|
|
|
# ===========================================================================
|
|
# 1. SearXNG — meta-search with JSON API
|
|
# ===========================================================================
|
|
searxng:
|
|
image: docker.io/searxng/searxng:latest
|
|
container_name: searxng-8889
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8889:8080"
|
|
volumes:
|
|
- /home/sparky/Docker/searXNG Firecrawl HHEM /searxng:/etc/searxng:rw
|
|
- searxng-cache:/var/cache/searxng:rw
|
|
environment:
|
|
- SEARXNG_BASE_URL=http://localhost:8889/
|
|
cap_drop:
|
|
- ALL
|
|
cap_add:
|
|
- CHOWN
|
|
- SETGID
|
|
- SETUID
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/healthz || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|
|
networks:
|
|
- dgx_net
|
|
|
|
# ===========================================================================
|
|
# 2. Firecrawl — web scraper (self-hosted, no API key required)
|
|
# Images must be pre-built: run build-images.sh before deploying this stack
|
|
# ===========================================================================
|
|
|
|
firecrawl-redis:
|
|
image: redis:7-alpine
|
|
container_name: firecrawl-redis
|
|
restart: unless-stopped
|
|
command: redis-server --bind 0.0.0.0 --save 60 1 --loglevel warning
|
|
volumes:
|
|
- firecrawl-redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
networks:
|
|
- dgx_net
|
|
|
|
firecrawl-postgres:
|
|
image: firecrawl-postgres:local
|
|
container_name: firecrawl-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=postgres
|
|
volumes:
|
|
- firecrawl-pg-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- dgx_net
|
|
|
|
firecrawl-playwright:
|
|
image: firecrawl-playwright:local
|
|
container_name: firecrawl-playwright
|
|
restart: unless-stopped
|
|
environment:
|
|
- PORT=3000
|
|
shm_size: "2gb"
|
|
networks:
|
|
- dgx_net
|
|
|
|
firecrawl-api:
|
|
image: firecrawl-api:local
|
|
container_name: firecrawl-api-3002
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3002:3002"
|
|
environment:
|
|
- USE_DB_AUTHENTICATION=false
|
|
- REDIS_URL=redis://firecrawl-redis:6379
|
|
- REDIS_RATE_LIMIT_URL=redis://firecrawl-redis:6379
|
|
- PLAYWRIGHT_MICROSERVICE_URL=http://firecrawl-playwright:3000/scrape
|
|
- NUQ_DATABASE_URL=postgres://postgres:postgres@firecrawl-postgres:5432/postgres
|
|
- HOST=0.0.0.0
|
|
- PORT=3002
|
|
- NODE_ENV=production
|
|
- BULL_AUTH_KEY=aitools-bull-changeme
|
|
- SEARXNG_ENDPOINT=http://searxng:8080
|
|
command: node dist/src/harness.js --start-docker
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ulimits:
|
|
nofile:
|
|
soft: 65535
|
|
hard: 65535
|
|
depends_on:
|
|
- firecrawl-redis
|
|
- firecrawl-postgres
|
|
- firecrawl-playwright
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3002/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
networks:
|
|
- dgx_net
|
|
|
|
# ===========================================================================
|
|
# 3. HHEM API — Vectara hallucination evaluator (CPU-only, ARM64)
|
|
# Images must be pre-built: run build-images.sh before deploying this stack
|
|
# ===========================================================================
|
|
hhem-api:
|
|
image: hhem-api:local
|
|
container_name: hhem-api-8881
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8881:8881"
|
|
volumes:
|
|
# Bind-mount the shared HF model cache so the HHEM model is only
|
|
# downloaded once and lives alongside all other LLMs on this host.
|
|
- /home/sparky/LLMs/huggingface:/hf-cache
|
|
environment:
|
|
- HF_HOME=/hf-cache
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8881/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 120s
|
|
networks:
|
|
- dgx_net
|
|
|
|
volumes:
|
|
searxng-cache:
|
|
firecrawl-redis-data:
|
|
firecrawl-pg-data:
|
|
|
|
networks:
|
|
dgx_net:
|
|
external: true
|