Stop the live HUD reconnect storm (nginx WS snippet + backoff), copy intel/nous_client into the summarizer image, and make event ingest idempotent on URL. GDELT uses the DOC API; NWS no longer sends bbox; FIRMS is one ON CONFLICT batch; GET /api/aircraft serves last-known. Health reports freshness without 503ing docker. EONET + CISA KEV added.
24 lines
698 B
Docker
24 lines
698 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
# libpq-dev + gcc for psycopg2 build/adapters; keep the image lean.
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq-dev gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY summarizer.py run_news_summarizer.py intel.py nous_client.py ./
|
|
|
|
# Security: run as a non-privileged user.
|
|
RUN useradd -m summarizer_user
|
|
USER summarizer_user
|
|
|
|
# Default: single pass (as the old k8s CronJob ran). The compose service
|
|
# overrides `command` to the scheduler loop (run_news_summarizer.py).
|
|
CMD ["python", "summarizer.py"]
|