P6: Migrate Kiwix and Transmission to Kubernetes #39

Merged
eblume merged 8 commits from feature/p6-kiwix-transmission-take2 into main 2026-01-21 18:07:41 -08:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 885b81820b - Show all commits

Fix kiwix to read ZIMs from transmission's complete folder

Transmission puts completed downloads in /downloads/complete/, not the
root of the downloads directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Erich Blume 2026-01-21 17:40:27 -08:00

View file

@ -22,7 +22,7 @@ spec:
# Get current ZIM files (among all downloads) # Get current ZIM files (among all downloads)
# This picks up ZIMs from both declarative list AND manually added torrents # This picks up ZIMs from both declarative list AND manually added torrents
current_zims=$(ls -1 /data/*.zim 2>/dev/null | sort | md5sum | cut -d' ' -f1 || echo "empty") current_zims=$(ls -1 /data/complete/*.zim 2>/dev/null | sort | md5sum | cut -d' ' -f1 || echo "empty")
# Get stored hash from deployment annotation # Get stored hash from deployment annotation
JSONPATH='{.metadata.annotations.kiwix\.blumeops/zim-hash}' JSONPATH='{.metadata.annotations.kiwix\.blumeops/zim-hash}'
@ -33,7 +33,7 @@ spec:
# Also list what ZIMs we found # Also list what ZIMs we found
echo "ZIM files found:" echo "ZIM files found:"
ls -la /data/*.zim 2>/dev/null || echo " (none)" ls -la /data/complete/*.zim 2>/dev/null || echo " (none)"
if [[ "$current_zims" != "$stored_hash" && "$current_zims" != "empty" ]]; then if [[ "$current_zims" != "$stored_hash" && "$current_zims" != "empty" ]]; then
echo "ZIM files changed, restarting kiwix deployment..." echo "ZIM files changed, restarting kiwix deployment..."

View file

@ -23,7 +23,7 @@ spec:
image: ghcr.io/kiwix/kiwix-serve:3.8.1 image: ghcr.io/kiwix/kiwix-serve:3.8.1
command: ["/bin/sh", "-c"] command: ["/bin/sh", "-c"]
args: args:
- "kiwix-serve --port=80 /data/*.zim" - "kiwix-serve --port=80 /data/complete/*.zim"
ports: ports:
- containerPort: 80 - containerPort: 80
name: http name: http