Adds a Notifications tab to Settings so an operator can pick which events reach their phone, published to a single self-hosted ntfy topic. The notifier subscribes to the realtime event hub the dashboard already consumes, so every notifiable event keeps exactly one publisher. Inbound media had no event, so `media.received` is added and published from the existing durable `gotImage` gate in the chat service — one notification per conversation, never repeated when the room re-syncs. It feeds the in-app notification bell as well. - Best-effort delivery: a rejecting or unreachable ntfy server is logged and never propagated into the path that produced the event. - Events buffered before the notifier attaches are skipped, so a restart cannot replay a backlog to somebody's phone. - Settings are applied field by field onto the live config object, so a save takes effect without a restart. - The access token is environment-owned (NTFY_AUTH_TOKEN) like the other secrets: stripped before the settings record is written, never returned by the API, which reports only `hasAuthToken`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
24 lines
562 B
YAML
24 lines
562 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
reddit-bot:
|
|
build: .
|
|
container_name: reddit-bot
|
|
restart: unless-stopped
|
|
dns:
|
|
- 1.1.1.1
|
|
- 8.8.8.8
|
|
volumes:
|
|
- reddit_bot_data:/app/data
|
|
expose:
|
|
- "3000"
|
|
environment:
|
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
|
- WEB_DASHBOARD_TOKEN=${WEB_DASHBOARD_TOKEN}
|
|
- REDDIT_BOT_AGENT_READ_TOKEN=${REDDIT_BOT_AGENT_READ_TOKEN:-}
|
|
- REDDIT_BOT_AGENT_CONTROL_TOKEN=${REDDIT_BOT_AGENT_CONTROL_TOKEN:-}
|
|
- NTFY_AUTH_TOKEN=${NTFY_AUTH_TOKEN:-}
|
|
|
|
volumes:
|
|
reddit_bot_data:
|