Add email as a second notification channel alongside ntfy: - Tabbed channel selector: ntfy | Email | Telegram (coming soon) | Discord (coming soon) - Active channel shown with green status dot on tab - Email tab: address input, Save & Enable, Test, Disable — same UX pattern as ntfy - Backend: SMTP config in settings (SMTP_HOST/PORT/USER/PASSWORD/FROM/STARTTLS) - Dispatcher: _send_email() helper wired into dispatch_notifications - POST /api/notifications/test/email endpoint with descriptive error messages - Email fires in same window as ntfy (respects quiet hours / digest hold) - Telegram and Discord tabs show coming-soon banners with planned feature description - .env.example documents all SMTP settings with provider examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
4.1 KiB
Plaintext
76 lines
4.1 KiB
Plaintext
# ─── URLs ─────────────────────────────────────────────────────────────────────
|
|
# Local hostname used when accessing the app on your LAN/server directly
|
|
LOCAL_URL=http://localhost
|
|
# Public-facing URL when accessed via your reverse proxy (leave blank if none)
|
|
PUBLIC_URL=
|
|
|
|
# ─── Auth ──────────────────────────────────────────────────────────────────────
|
|
# Signs and verifies JWT tokens. Anyone with this key can forge auth tokens,
|
|
# so use a long random value in production and never commit it to git.
|
|
# Generate: python -c "import secrets; print(secrets.token_hex(32))"
|
|
JWT_SECRET_KEY=
|
|
|
|
# ─── PostgreSQL ───────────────────────────────────────────────────────────────
|
|
POSTGRES_USER=congress
|
|
POSTGRES_PASSWORD=congress
|
|
POSTGRES_DB=pocketveto
|
|
|
|
# These are constructed automatically from the above in docker-compose.yml.
|
|
# Override here only if connecting to an external DB.
|
|
# DATABASE_URL=postgresql+asyncpg://congress:congress@postgres:5432/pocketveto
|
|
# SYNC_DATABASE_URL=postgresql://congress:congress@postgres:5432/pocketveto
|
|
|
|
# ─── Redis ────────────────────────────────────────────────────────────────────
|
|
REDIS_URL=redis://redis:6379/0
|
|
|
|
# ─── api.data.gov (Congress.gov + GovInfo share the same key) ─────────────────
|
|
# Free key: https://api.data.gov/signup/
|
|
DATA_GOV_API_KEY=
|
|
|
|
# How often to poll Congress.gov for new/updated bills (minutes)
|
|
CONGRESS_POLL_INTERVAL_MINUTES=30
|
|
|
|
# ─── LLM Provider ─────────────────────────────────────────────────────────────
|
|
# Choose one: openai | anthropic | gemini | ollama
|
|
LLM_PROVIDER=openai
|
|
|
|
OPENAI_API_KEY=
|
|
OPENAI_MODEL=gpt-4o
|
|
|
|
ANTHROPIC_API_KEY=
|
|
ANTHROPIC_MODEL=claude-opus-4-6
|
|
|
|
GEMINI_API_KEY=
|
|
GEMINI_MODEL=gemini-1.5-pro
|
|
|
|
# For Ollama: use host.docker.internal to reach a locally running Ollama server
|
|
OLLAMA_BASE_URL=http://host.docker.internal:11434
|
|
OLLAMA_MODEL=llama3.1
|
|
|
|
# ─── Google Civic Information API ─────────────────────────────────────────────
|
|
# Used for zip code → representative lookup in the Draft Letter panel.
|
|
# Free tier: 25,000 req/day. Enable the API at:
|
|
# https://console.cloud.google.com/apis/library/civicinfo.googleapis.com
|
|
CIVIC_API_KEY=
|
|
|
|
# ─── News ─────────────────────────────────────────────────────────────────────
|
|
# Free key (100 req/day): https://newsapi.org/register
|
|
NEWSAPI_KEY=
|
|
|
|
# ─── Google Trends ────────────────────────────────────────────────────────────
|
|
PYTRENDS_ENABLED=true
|
|
|
|
# ─── SMTP (Email Notifications) ───────────────────────────────────────────────
|
|
# Leave SMTP_HOST blank to disable email notifications entirely.
|
|
# Supports any standard SMTP server (Gmail, Outlook, Postmark, Mailgun, etc.)
|
|
# Gmail example: HOST=smtp.gmail.com PORT=587 USER=you@gmail.com (use App Password)
|
|
# Postmark example: HOST=smtp.postmarkapp.com PORT=587 USER=<api-token> PASSWORD=<api-token>
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
# From address shown in the email header — defaults to SMTP_USER if blank
|
|
SMTP_FROM=
|
|
# Set to false only if your SMTP server uses implicit TLS on port 465
|
|
SMTP_STARTTLS=true
|