Notes »

Serving Media

These are some quick notes on how I am setting up the media architecture. I'm using Zola to generate the pages which link to media files cached by Varnish locally and stored on another server (the $SERVARICA_POLAR_IP VPS).

This is the shell script that I run on my desktop after doing a recording, it sends the new MP3 over to the polar storage VPS, generates an file with a TOML array of the MP3 filenames which is used by Zola to build a static site. This static site is then uploaded here and served through Caddy.

rsync -hvrPt bible-readings/ $SERVARICA_POLAR_IP:/var/www/media/bible-readings/
cd $HOME/media_site/content/bible && ./ >
cd $HOME/media_site && zola build
rsync -hvrPt $HOME/media_site/public/

cat index_base.tmp
MP3S=( $(cd $HOME/bible-readings/ && ls -dt *.mp3) )
printf "mp3s = [\"${MP3S[0]}\""
for mp3 in "${MP3S[(at sign here breaks pmwiki)]:1}"
    printf ",\"$mp3\""
printf "]\n+++"


title = "Bible Readings"
template = "bible.html"


It's totally unstyled right now, but the eye candy comes later. Might even work on a script to pull descriptions and thumbnails from Odysee to make a nice interface, but for now it's bare minimum and works for keeping the recordings available in case Odysee just goes away someday. Will be working on videos next.

edit SideBar

Page last modified on November 03, 2023, at 03:35 am