- Python 99.2%
- Dockerfile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Build irc-cache image / Build container image (push) Successful in 23s
Previously a Valkey hiccup in _start() aborted startup silently: the UI kept serving 200 while the IRC bot and prune loop never ran. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
| .forgejo/workflows | ||
| src/irc_cache | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| compose.dev.yaml | ||
| compose.yaml | ||
| Dockerfile | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
irc-cache
IRC bot that logs channel traffic into Valkey (kept for 6 hours, indexed for search) with a NiceGUI search frontend.
Deploy (Docker Swarm + Traefik)
cp .env.example .env # set IRC_HOST, IRC_CHANNELS, TRAEFIK_NETWORK, TRAEFIK_CERTRESOLVER, IMAGE
docker build -t irc-cache:latest . # push to a registry and set IMAGE if the swarm has several nodes
docker compose config | docker stack deploy -c - irc-cache
Served at https://irc.l1.m1ch.eu via Traefik. Valkey persists to the valkey-data volume (AOF); it is a node-local volume, so both services are pinned to vm40 (local image and local volume); see the placement constraints in compose.yaml.
Develop
docker run -d -p 6379:6379 valkey/valkey:8-alpine
VALKEY_URL=redis://localhost:6379/0 IRC_CHANNELS='#foo' uv run irc-cache
Search
foo bar: every term must appear somewhere in the message (substring, case-insensitive)."foo bar"or'foo bar': exact match, whole word/phrase.-term/-"exact": message must not contain it.- The nick filter is exact. Shows the newest
DEFAULT_LIMIT(10) matches by default (Limit field). - Only announces of the form
#<id> ... [<size>] <item>are recorded. The table shows ID, size and item plus the XDCC command (click a row to copy it; duplicate channel+nick+ID rows show once, newest)/msg <nick> xdcc send #<id>; the "Raw message" checkbox shows the full message instead of size/item.
Saved searches and notifications
"Save search" stores the current search text/channel/nick (kept indefinitely in Valkey, not subject to the 6h cache). Every newly recorded announce is checked against the saved searches; on a match an ntfy message is sent with the ID, size, item and the /msg … xdcc send #id command. Each saved search then has a cooldown (NOTIFY_COOLDOWN_HOURS, default 12h) before it can notify again. Set NTFY_URL, NTFY_TOPIC and optionally NTFY_TOKEN; without a topic notifications are off. Only future messages trigger; existing cached ones don't.
Channels
IRC_CHANNELS are joined and cached. IRC_CHANNELS_NOCACHE are joined but never stored. The page footer shows the connection status.