2022/06/18

redbean

This site now runs on redbean! I remember first coming across a post on HackerNews last year and being fascinated. With the recent release of version 2, I knew I had to move this site over.

For all of the effort I put into keeping the site small and simple, it always felt weird to deploy it using docker behind nginx. I initially wanted to use a smaller docker image, but that felt like I was avoiding the problem. Now, this website is a single zipfile/executable (on the order of a few MB) that can be run on Linux, Mac, Windows, FreeBSD, OpenBSD, and NetBSD. To deploy, I rsync the file to a server and ssh in to restart the server. The only infrastructure needed on the server side is setting up some files paths, initializing SSL certs using certbot from Let's Encrypt, and dropping in a script to use the certs.

I was able to set everything up by using the redbean docs without issue. The only major quirk I ran into was with caching, but it looks like this is a known issue. I got around this by not using caching, which is something I don't mind doing since I intentionally try to keep this website small.

I'd love to spend some time to wrap my head around Cosmopolitan Libc and create some Actually Portable Executables of my own.