electric-horses-infra/stacks/eh-search/docker-compose.yml
Benjamin Weinlich b3813ed6ac feat(stacks/eh-search): add site-search FastAPI service
Mirrors /opt/ai-apps/eh-search/ on the server, including the full
FastAPI app (intent routing, FTS+fuzzy+substring hybrid, multi-source
federation across vehicles + blog + brands + pages + static + tag
bridge), SQL schema (Postgres materialized view with german_unaccent
text search, pg_trgm for fuzzy), Dockerfile and compose.

Sanitized the hardcoded password in sql/01_init.sql — replaced with
REPLACE_ME_BEFORE_APPLYING placeholder since this repo is public.

The eh-search service binds only on the private network (10.0.0.8:8200)
and is reachable only via Pegasus nginx proxy at /api/search.

Refs OP#1094 OP#1105 OP#1112 OP#1116 OP#1117
2026-04-11 22:19:39 +02:00

57 lines
1.3 KiB
YAML

# eh-search Stack on ai-apps
# Service is INTERNAL ONLY - bound to private network 10.0.0.8
# Reached by Pegasus via nginx proxy_pass on 10.0.0.10
services:
eh-search:
build: .
image: eh-search:dev
container_name: eh-search
restart: unless-stopped
env_file: .env
ports:
# Bind ONLY to private network IP, not 0.0.0.0
- "10.0.0.8:8200:8200"
networks:
- eh-search-internal
depends_on:
eh-search-redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8200/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
eh-search-redis:
image: redis:7-alpine
container_name: eh-search-redis
restart: unless-stopped
command: redis-server --maxmemory 64mb --maxmemory-policy allkeys-lru --save ""
networks:
- eh-search-internal
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
deploy:
resources:
limits:
memory: 96M
cpus: "0.2"
networks:
eh-search-internal:
driver: bridge