Expand compose env vars; add ntfy token + priority + TZ support

docker-compose.yml:
- Every env var documented inline with type/default/purpose
- env_file: .env (required: false) — container starts without it
- NTFY_TOPIC uses :? operator so compose errors clearly if unset
- New vars: NTFY_TOKEN (private topics), NTFY_PRIORITY, TZ, APP_PORT, DEV_PORT
- Removed duplicate NTFY_URL entry

notifier/index.mjs:
- Reads TZ from env (was hardcoded "America/Chicago")
- Reads NTFY_PRIORITY from env (was hardcoded "default")
- Adds Authorization: Bearer header when NTFY_TOKEN is set
- Startup log shows auth status and full schedule config

.env.example: mirrors every compose variable with descriptions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-17 13:22:28 -04:00
1 parent 7f38c038fb
commit 0eb625c188
3 files changed
+90 -31

No files matched your search

+32 -11
View File
@@ -1,17 +1,38 @@
# Copy to .env and fill in your values
# Copy this file to .env and fill in your values.
# docker-compose reads .env automatically for variable substitution.
# ntfy topic — make it unguessable (anyone who knows it can receive/send)
# Subscribe at https://ntfy.sh/YOUR_TOPIC or in the ntfy app
# ── App ────────────────────────────────────────────────────────────────────────
# Port the web app is exposed on (default: 8080)
APP_PORT=8080
# ── ntfy ──────────────────────────────────────────────────────────────────────
# Required — your ntfy topic. Keep it unguessable (anyone with the name can sub).
# Subscribe at https://ntfy.sh/YOUR_TOPIC or in the ntfy iOS/Android app.
NTFY_TOPIC=your-unguessable-topic-here
# Optional: self-hosted ntfy server
# NTFY_URL=https://ntfy.sh
# ntfy server — leave as-is for ntfy.sh, or point to your self-hosted instance
NTFY_URL=https://ntfy.sh
# Optional: URL the notification links back to (your deployed app)
# APP_URL=http://localhost:8080
# Bearer token for private/access-controlled topics (leave blank for public)
NTFY_TOKEN=
# Optional: cron schedule (default: 9 AM on the 1st of every month)
# CRON_SCHEDULE=0 9 1 * *
# Notification priority: min | low | default | high | urgent
NTFY_PRIORITY=default
# Set to "true" to get a test ping the moment the notifier starts
# NTFY_TEST_ON_START=false
# ── Schedule ──────────────────────────────────────────────────────────────────
# Cron schedule for the monthly reminder (default: 9 AM on the 1st of each month)
# Format: minute hour day-of-month month day-of-week
CRON_SCHEDULE=0 9 1 * *
# IANA timezone for the cron schedule
TZ=America/Chicago
# URL the notification deep-links back to
APP_URL=http://localhost:8080
# Set to "true" to fire a test notification the moment the notifier container starts
NTFY_TEST_ON_START=false
# ── Dev ───────────────────────────────────────────────────────────────────────
# Port for the Vite dev server (docker compose --profile dev up dev)
DEV_PORT=5173