Archiving a Husky-CMS website

unplatform/husky-cms is a node project which allows you to create a website from a Trello board. We’ve used it at fempower.tech to run event sites in the past. The site updates as you make changes to the board, which allows less technical collaborators to easily make changes to the content.

When the event is over, though, it makes sense to archive the site into a read-only mode, so that it no longer relies on the trello board and (more importantly for me) uses less RAM on the server. ctop shows the husky-cms container openlab/husky-cms:latest using 50-60M of memory (as it’s running node). I can get this down to 1-2MB by archiving the site to a static structure and serving it up with nginx.

Wget is my tool of choice for this. The EFF have a great article on mirroring websites using wget. The command I ran is taken from there:

wget -mkxKE -e robots=off http://www.example.org/

This creates a static directory containing the website files. For the ‘projects’ view, which we use as an image gallery, I also had to grab the json which runs it:

wget http://www.example.org/gallery.json

This is because this loads after the page via AJAX, and wget doesn’t know about it. It’s not a browser, just a command-line tool. Putting this in the root of the site got the gallery running again, although all of the images are still hosted in Trello’s AWS bucket. Mirroring all of the images is non-trivial, so I plan to leave them loading from there for now. I also tweaked the JS projects.js file to disable links to images from the projects tab, so will re-use that version next time I archive a site.