Site Live

After months and months of fiddling and fussing, the site is finally migrated off of GitHub pages and deployed to the web. I got to the point where I had to make a call and diverge from the original plan to self-host on my Raspberry Pi.

I had everything ready to go to proceed with serving the site with NGINX, but ultimately decided that maintaining the server, and casually exposing my home network to the internet, were not well advised, given my limited knowledge and skills in this area. My goal with this project was to migrate off GitHub and continue being able to easily and efficiently author content, not to be distracted with servicing a system. I am so enticed by minimal computing, permacomputing, etc., but this interest is accidental to the actual purpose of the site, and was causing unnecessary delays and frustration.

I was not entirely ready to abandon the Pi, so I spent most of the day yesterday exploring other hosting alternatives. First, I tried Codeberg Pages, setting up a double repository for the source and the live site. However, Codeberg Pages does not play nice with SSL, and due to some limitations with Hover I was not able to arrive at a solution.

Next, I thought I would give Neocities a try, and attempted to get set up with my site mounted as a drive on my computer using WebDAV. The goal was to mount the _site directory, where Jekyll builds the live site, as the drive to sync to Neocities. I got everything working, but unfortunately davfs2, the Linux file system driver for mounting WebDAV resources, is extremely slow. Building directly into the mounted drive and then syncing to Neocities resulted in an interminable process.

At this point, very dejected, it became clear to me that I needed to change my approach. Hoping that my Windows PC could handle WebDAV more proficiently, I installed Ruby and Jekyll there and synced to the repository. The site built extremely quickly (on average 8-12 seconds) in comparison to the Pi (which is of course to be expected), but unfortunately, even a more powerful machine could not improve WebDAV’s performance. I mounted my site using Mountain Duck, and once again encountered extremely slow write and sync times. For a site with thousands of posts like mine, davfs2 and WebDAV are simply not effective.

So at last, it was time to make a full pivot. I had come across Netlify in my research, and saw that they had native support for building static sites. With Ruby and Jekyll installed already, I opened their guide and got started. Sadly, Netlify only supports the big three git providers—GitHub, GitLab, and Bitbucket—so I decided to clone my Codeberg repository to GitLab, which seemed the best option of the three. I then connected Netlify to GitLab, entered jekyll build in the build command field, _site in the publish directory field, and clicked deploy site. The site was live at the Netlify generated url soon after. It was simple, then, to follow the steps provided (with some Hover-specific clarification provided by Terabyte Tiger) to connect my Hover domain to Netlify, making sure to set up the www CNAME so that I could make use of the full power of Netlify’s CDN. Netlify handles SSL certificates with Let’s Encrypt, so about thirty minutes after updating my DNS records in my Hover dashboard, those changes had propagated and Netlify was able to enable HTTPS for the site.

The process of getting GitLab and Netlify up and running took maybe two hours. Though I was sad to give up on the dream of a low-tech, self-hosted solution, as a networking lay-person, I know enough to be able to recognize the difference between a solution I can manage and one I cannot. My new workflow for updating the site is simple, direct, and efficient, and the end result is just as lightweight, but with better performance than if I had hosted it myself.

I have learned so much through this process, so I am glad that I at least made the attempt. I am very excited to experiment with the Pi for future projects. But for now, it’s time to get back to the purpose of the site—the research and writing for which I created it in the first place.


Previous Update Next Update

« Atom Alexandria »