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:
@@ -64,3 +64,12 @@ DIGEST_MINIFLUX_HEADLINES_MAX=15
|
||||
# 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
|
||||
|
||||
# ── multi-tenant (optional) ──────────────────────────────────────────
|
||||
# Per-user instances are deployed via scripts/add-digest-user.sh, which
|
||||
# materializes a per-user .env and sets DIGEST_PROJECT to namespace
|
||||
# container names + homepage labels. Leave unset for the singleton
|
||||
# install — defaults preserve the original "news-digest" naming.
|
||||
# DIGEST_PROJECT=digest-alice
|
||||
# DIGEST_HOMEPAGE_NAME=Alice's Digest
|
||||
# DIGEST_HOMEPAGE_DESC=Personal news brief for Alice
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -899,9 +899,15 @@ a:hover { color: var(--accent); }
|
||||
padding: 24px var(--pad-x) 16px;
|
||||
row-gap: 12px;
|
||||
}
|
||||
/* Desktop pins brand+edition both to grid-row 1, which collapses
|
||||
them on top of each other once we go single-column. Reset row
|
||||
placement so they auto-flow vertically. */
|
||||
.masthead-brand,
|
||||
.masthead-edition,
|
||||
.masthead-meta { grid-column: 1 / 2; }
|
||||
.masthead-meta {
|
||||
grid-column: 1 / 2;
|
||||
grid-row: auto;
|
||||
}
|
||||
.masthead-edition { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
|
||||
.edition-stamp { font-size: 16px; padding: 3px 8px; }
|
||||
.masthead-meta {
|
||||
|
||||
Reference in New Issue
Block a user