No description
  • Python 99.2%
  • Dockerfile 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael (m1ch) Klamminger a89fc0da05
All checks were successful
Build irc-cache image / Build container image (push) Successful in 23s
Retry Valkey on startup; exit if unreachable so Swarm restarts
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>
2026-10-12 12:11:05 +00:00
.forgejo/workflows Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
src/irc_cache Retry Valkey on startup; exit if unreachable so Swarm restarts 2026-10-12 12:11:05 +00:00
.env.example Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
.gitignore Add IRC logger with NiceGUI search, Valkey index and Swarm stack 2026-09-19 14:42:59 +00:00
CLAUDE.md Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
compose.dev.yaml New UI: header, yellow theme, favicon, editable saved-searches table 2026-09-20 13:55:25 +00:00
compose.yaml Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
Dockerfile Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
pyproject.toml Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
README.md Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00
uv.lock Rename project to irc-cache; split dev/prod compose files 2026-09-20 10:44:31 +00:00

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
  • 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.