- _fetch_and_index now extracts img src URLs, filters junk, stores in OpenSearch - get_db() uses PGHOST/PGUSER/etc env vars for Docker compatibility - search endpoint returns images + image_count in hits - Docker run command passes all PG env vars - Discovery script runs via SSH to CT to avoid VPN issues
102 lines
2.9 KiB
YAML
102 lines
2.9 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# ── Web Crawler ────────────────────────────────────────────
|
|
yacy:
|
|
image: yacy/yacy_search_server:latest
|
|
container_name: yacy
|
|
ports:
|
|
- "8090:8090"
|
|
environment:
|
|
- YACY_ADMIN_PASSWORD=research2026
|
|
volumes:
|
|
- yacy_data:/opt/yacy_search_server/DATA
|
|
restart: unless-stopped
|
|
mem_limit: 2g
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8090/api/status.json"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# ── Document Index ─────────────────────────────────────────
|
|
opensearch:
|
|
image: opensearchproject/opensearch:2.17.0
|
|
container_name: opensearch
|
|
environment:
|
|
- discovery.type=single-node
|
|
- DISABLE_SECURITY_PLUGIN=true
|
|
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx2g"
|
|
- DISABLE_INSTALL_DEMO_CONFIG=true
|
|
ports:
|
|
- "9200:9200"
|
|
- "9600:9600"
|
|
volumes:
|
|
- opensearch_data:/usr/share/opensearch/data
|
|
restart: unless-stopped
|
|
mem_limit: 3g
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
# ── Cache / Job Queue ──────────────────────────────────────
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
# ── Database ───────────────────────────────────────────────
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: postgres
|
|
environment:
|
|
- POSTGRES_USER=research
|
|
- POSTGRES_PASSWORD=ResearchDB2026!
|
|
- POSTGRES_DB=research_engine
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "research"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ── API + Dashboard ────────────────────────────────────────
|
|
backend:
|
|
build: .
|
|
container_name: research-backend
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
depends_on:
|
|
opensearch:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
yacy_data:
|
|
opensearch_data:
|
|
redis_data:
|
|
postgres_data:
|