The other day, I was asked on IRC what did this website run on.
Let’s go from the bottom to the top. First, the hardware:
An Intel Atom (D945GCLF2) with just a power cord and an ethernet cable comming out of it, sitting on my home desk. A single 300GB disk, no raid, no backups, no SAI, the best setup ever. 2GB RAM. Since the fan is noisy, I have it set to never spin below 75°C.
Now, for the software:
- Arch Linux using the LTS kernel. I update it when I feel like it.
- Nginx, serving plain text files, and running a reverse proxy for:
- A cherrypy (python) server
- A hunchentoot (lisp) server
Everything is started using systemd service files. The lisp server runs on sbcl, wrapped by rlwrap, inside in a tmux session, and is responsible for http://cosarara.me/cl/archive (please forgive me for letting an implementation detail inside a URL).
The cherrypy server runs as is (service Type=simple), and used to serve this blog directly. Right now I use it to preview things before generating the actual static files.
At the time of writing, the script I use to generate the static content looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
(gotta automate that range(1, 10))
As for the pages and entries themselves, I write them in either markdown or HTML, and they are rendered automatically inside a mako template. Mako! Mako! Everything runs on mako and these AVALANCHE terrorists won’t stop me. All the code is in a nice <200 SLOC web.py file.
I guess I could use something like pelican instead, but this system is already built, it works, and it’s flexible.