Migrating to Fly.io
When I wrote my last post about stepping back, I didn’t anticipate it’d be over four years until I posted again. And yet, 1,486 days have passed since I posted last.
Whoops.
Even more embarassing, the SSL cert expired sometime over the summer. My process for rotating the certs required around ~15 minutes of manual ops work every 90 days.1 Honestly, I’m giving myself credit for keeping the cert fresh for over three and a half years, but over a delightfully packed summer, the need to manual action caught up with me.
At minimum, I wanted this site’s content backlog to be accessible, and I’d like the blog to be ready if I decide to start posting again.
I’d been letting different ideas for migrating the blog percolate. I knew my current solution, outlined in this post, was too heavy-weight. In addition to the manual cert generation/rotation, I no longer had the appetite for managing EC2 instances (even with all the investments in Packer, Ansible, and Terraform). And I knew I definitely didn’t want to self-host a k8s cluster just to run this blog.
I thought briefly about doing a static site on S3, but I already explored that path in college and didn’t feel like I’d learn much from this path.
I also thought about using sourcehut pages. I’ve used this strategy for simple static sites before (specifically, the incredibly important task of making a website for my dog). sourcehut pages have some limitations, but I think my blog would’ve been compliant (or it least could’ve been with minor tweaks).
During the time I was letting ideas marinate, I kept on seeing Fly.io pop-up in different places. Looking back, I can’t remember the exact sources, although they definitely included the Changelog podcasts and Xe Iaso’s blog. Ultimately, I decided to give Fly.io a try, and as of today, this site is served by Fly.io.
I’m definitely still early days w/ Fly.io, but I see a lot to like. I was impressed with the ease of launch (it took me less than an hour to deploy this static site with custom domain and SSL). At the same time, it appears Fly offers a lot of power tools, with excellent docs, for diving deep. So far, I’m running this simple static blog on 2 machines, each with 1 CPU and 256mb RAM, for less than $5 per month.
If you’re curious around the process of migrating to Fly.io,
it’s quite simple. This PR
deploys the app (i.e. packages the site into a simple Docker container running nginx and runs fly launch
to generate fly.toml
). With the app deployed, this PR
sets up the proper DNS records. To add SSL, just run fly certs add $HOSTNAME
for each $HOSTNAME.
I’m excited about how simple and affordable it is to get started with Fly.io, and excited to experiment with this platform further.
Many exciting changes in my life since I last updated this blog… but I’ll save that for a separate post (and maybe updating the About page as well). But one update that can’t wait is that I’ve become a dad to the world’s best pug.
And, that’s it! In all my leisure code and writing, I’m mostly focusing on keeping it fun and interesting for myself, so not going to target any explicit writing schedule, etc. But hopefully will be a little more frequent than my historical rate of once every four years :)
-
Specifically, I was generating a wildcard DNS cert via Let’s Encrypt. That cert lasted 90 days. I hadn’t made investments in automating that process. ↩︎