Secure containerized SPA hosting with spartan

Every now and then I have to build some browser based application for which I often end up using an SPA (single page application) approach. For instance, combining Vite with React and React Router in my opinion is a fast approach to get something ready quick. Adding MUI on top for a nice-looking experience can help too.

Then comes the time when this needs to be hosted somewhere, such that browsers can download the static assets linked from the index.html at the root to make the application availble for others to use. Using your everyday hosting provider can be simple and straightforward, and very often a good enough choice. Those providers usually have some offerings for static web hosting (which an SPA basically is), which they build in their infrastructure through virtual hosts through Apache HTTP Server or nginx or something like that. Those servers do the trick, and they can be configured through - sometimes very complicated - configuration settings. Sometimes I use this sort of thing too. So far so good.

read more →

Container images with golang from scratch

One of the things I like about golang (and Rust too, by the way) is that it’s quite simple to build really small container images by statically linking the executables, and using scratch as the base image. I’ve done this a few times in the past, and was doing it again just recently. Except that this time around, I ran into issues: the container would crash soon after it started.

read more →

Cheap and Secure Cloud Backups

I’ve wanted to find a good provider of cheap and secure cloud backups for a while. I’ve compared some cloud drive providers, but didn’t quite like those. They usually have very limited free plans, somewhat pricey paid plans (e.g. 50GB for about 24$ a year for OneDrive), or like in the case of Google no information available at all. By the way, “Google one is coming soon” isn’t an announcement that I want to look at for more than a few days when looking for pricing info. Then, I’ve looked at pricing of cloud storage providers, such as AWS, Azure and Google Cloud. Those offer storage around 1 cent ($0.01) per GB per month. That’s a quarter of the OneDrive cost! It’s even less if you consider their archive offerings (AWS Glacier, Archive in Azure, Coldline Storage for Google). The cheapest offering here is from Microsoft at 0.2 cents ($0.002) per GB per month, but with some usage caveats. Since the point of backups is to keep them for a long time, this quickly adds up though. Now I’ve written a line or two of code before, so I figured I could as well write my own tool for this. So here is bart, the backup and restore tool. Note that at this point I do not offer bart as a ready-to-use executable, but only as MIT-licensed source code. In addition, bart currently works only with Azure Blob Storage - or with storage mounted into the machine’s file system. However, adding other cloud providers/archive destinations should be relatively easy, given the interfaces used in the tool.

read more →