news-digest: multi-tenant deploy + masthead overlap fix

Two pieces:

1) Multi-tenant onboarding via scripts/add-digest-user.sh

   Shared miniflux + per-user digest stack. Onboarding a teammate
   takes one command (plus a one-time sudo for dir creation):

     scripts/add-digest-user.sh <username>

   What the script does:
     - Reads miniflux admin creds from ana-docker
     - Allocates next free port (scans existing digest-*/.env)
     - Generates a random password (or accepts one as 2nd arg)
     - Creates the miniflux user via the admin API
     - Materializes a per-user .env at /opt/docker/compose/digest-<user>/
       (inherits NEWS_DIGEST_TAG from the canonical stack so all
       tenants run the same image)
     - Brings up `docker compose -p digest-<user> up -d`
     - Seeds default world/local feeds in the new user's miniflux
     - Triggers a first digest run

   compose.yaml now uses ${DIGEST_PROJECT:-news-digest} to namespace
   container_name + homepage labels. Default keeps backward-compat
   for the singleton install — existing stacks unaffected.

2) Masthead overlap on phone widths

   Desktop CSS pinned .masthead-edition to grid-row 1, which collided
   with .masthead-brand once the mobile media query collapsed both
   to grid-column 1. Result: "MORNING EDITION" badge stacked on top
   of the "DAILY DIGEST" hero. Reset grid-row to `auto` for all
   three masthead children in the ≤720 px breakpoint so they
   auto-flow vertically.
This commit is contained in:
vh
2026-04-28 13:53:26 -07:00
parent be7cb298b6
commit aeb5c18ca3
4 changed files with 197 additions and 5 deletions
+8 -4
View File
@@ -21,7 +21,11 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: news-digest-worker
# ${DIGEST_PROJECT} prefixes container names so multiple instances
# (one per teammate, scoped to their miniflux user) can coexist on
# the same host. Default keeps backward-compat with the original
# singleton deploy.
container_name: ${DIGEST_PROJECT:-news-digest}-worker
restart: unless-stopped
environment:
- TZ=${NEWS_DIGEST_TZ:-America/Los_Angeles}
@@ -57,7 +61,7 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: news-digest-web
container_name: ${DIGEST_PROJECT:-news-digest}-web
restart: unless-stopped
depends_on:
- news-digest-worker
@@ -90,9 +94,9 @@ services:
- tnet
labels:
- homepage.group=News
- homepage.name=Daily Digest
- homepage.name=${DIGEST_HOMEPAGE_NAME:-Daily Digest}
- homepage.icon=mdi-newspaper-variant-outline
- homepage.description=LLM-curated briefing across feeds, twice daily
- homepage.description=${DIGEST_HOMEPAGE_DESC:-LLM-curated briefing across feeds, twice daily}
- homepage.href=http://10.250.50.70:${NEWS_DIGEST_PORT}
networks: