Files
esh-pfi-infrastructure/stacks/news-digest/.env.example
T
vh 9bdb41ea6a news-digest: add world + local headlines sections
Two new dense headline rails above the existing reddit/tech cards.
Designed for high-volume "what happened" coverage where the title
is the deliverable — no LLM summarization, ~15 items per section,
6-column-collapsing grid (title / source / time).

Digest pipeline:
  * fetch_miniflux_headlines(category) — flat list per category, dedup
    by lowercased title (different feeds syndicate the same wire stories)
  * 8h look-back window (vs 12h for tech/reddit) since headlines move
    faster
  * cap of 15 per section (DIGEST_MINIFLUX_HEADLINES_MAX)

Frontend:
  * .headline element parallels .item for the hide-button machinery
    (both have data-id, both honored by app.js)
  * dense 3-col layout collapses to 1-col on narrow screens
  * jumpnav now numbers world=01, local=02, reddit=03, tech=04

Setup:
  * seed-headlines.py — one-shot script (lives in the image at
    /app/seed-headlines.py). Creates the World + Local categories in
    miniflux, subscribes a curated feed list, and renames each feed
    to a short display title (BBC vs "BBC News", "LA Times" vs "California").
    Idempotent — reruns only add new feeds.
  * Default world: BBC, NPR, Al Jazeera. Default local: LA Times Local,
    LA Times CA, Voice of OC. (OC Register blocks miniflux; left out.)
  * entrypoint.sh now syncs templates/{style.css,app.js,favicon.svg}
    to /output on container start so frontend asset updates land
    without a manual copy after rebuild.
2026-04-28 11:14:15 -07:00

67 lines
3.3 KiB
Bash

# news-digest stack tunables. Copy to `.env` on ana-docker before
# deploying and fill in MINIFLUX_PASSWORD.
# ── image pin ────────────────────────────────────────────────────────
# Bump when you change Dockerfile / digest.py / templates / crontab
# to force a clean image build.
NEWS_DIGEST_TAG=v1
# ── network ──────────────────────────────────────────────────────────
# Host port for the static web container (nginx). Container 80.
# Reserved on ana-docker (sample): 5001 Dockge, 7878 task-board,
# 8000 (other), 8025/8088/8090/8100/8380/8780 (various), 8080 Miniflux.
# 8181 free.
NEWS_DIGEST_PORT=8181
NEWS_DIGEST_BIND=0.0.0.0
# Timezone — busybox crond honors this for fire-times.
NEWS_DIGEST_TZ=America/Los_Angeles
# ── llama-swap (LLM summarizer) ──────────────────────────────────────
# Model picked for one-shot summarization quality + low VRAM impact.
# qwen3.5-35-a3b is loaded in the persistent group on ana-ml2.
LLAMA_SWAP_URL=http://10.250.50.54:9292
# granite-4-small — small (~4B), fast (~1s/call), no extended-thinking
# phase that eats the token budget like qwen3.x do. Plenty of capability
# for the one-sentence-tldr + one-word-tag task. To swap to a larger
# model later, ones currently working: gemma4-26b-a4b, granite-4-small.
# Avoid: qwen3.5-35-a3b (model file broken — process exits on launch),
# qwen3.6-35-a3b (defaults to thinking mode, eats budget without output).
LLAMA_SWAP_MODEL=granite-4-small
LLAMA_SWAP_TIMEOUT=180
# ── miniflux (feed source for Tech aggregators + subreddit list) ─────
# In-cluster: miniflux container is on traefik-net so we can reach it
# by container hostname. From-host fallback: http://10.250.50.70:8080
MINIFLUX_URL=http://miniflux:8080
MINIFLUX_USER=lkraven
MINIFLUX_PASSWORD=CHANGE_ME
# Category in Miniflux holding non-Reddit feeds (HN, Lobste.rs, etc).
DIGEST_MINIFLUX_TECH_CATEGORY=Tech aggregators
# ── filtering knobs ──────────────────────────────────────────────────
# Reddit: only consider posts created in the last N hours, with
# at least N upvotes and an upvote ratio above threshold.
DIGEST_REDDIT_HOURS=12
DIGEST_MIN_SCORE=50
DIGEST_MIN_RATIO=0.85
DIGEST_MAX_PER_SUB=8
# Miniflux Tech aggregators: same look-back window + cap per source.
DIGEST_MINIFLUX_HOURS=12
DIGEST_MINIFLUX_MAX=8
# Miniflux World/Local headlines (high-volume, dense list, no LLM
# summarization). Categories must exist in miniflux — see
# stacks/news-digest/seed-headlines.py for the one-shot setup.
DIGEST_MINIFLUX_WORLD_CATEGORY=World
DIGEST_MINIFLUX_LOCAL_CATEGORY=Local
DIGEST_MINIFLUX_HEADLINES_HOURS=8
DIGEST_MINIFLUX_HEADLINES_MAX=15
# ── output dir on host (bind-mounted) ────────────────────────────────
# Separate from /opt/docker/conf/<stack>/ to keep generated content
# distinct from config. Owned by container UID; writes are atomic.
NEWS_DIGEST_OUTPUT_DIR=/opt/docker/data/news-digest