Image scraping + Postgres env vars + search results include images
- _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
This commit is contained in:
@@ -56,7 +56,46 @@ services:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user