Ship your Racket web-server like a true pirate!
Anne Bonny was one of the few women to engage in piracy during the 18th century, golden age of pirates.
She lived a adventurous and risky life on the sea, fighting and plundering ships.
I needed a name for my "web container shipping manager", so, as a tribute, I'll make her the captain of my web-server ship.
This is an attempt at writing the simplest container management tool ever, using the Racket web-server to handle webhooks, systemd-nspawn for containers, machinectl to check their status, and an optional nginx server to reverse-proxy and load-balance requests.
raco pkg install bonny
bonny serve
(run the bonny server)
bonny dashboard
(run the bonny web dashboard)
When you're at ease with the way bonny works, you can simply setup a systemd unit:
cp bonny-server/templates/bonny.service /usr/lib/systemd/system/bonny.service
systemctl enable bonny
systemctl start bonny