Hello World!
Updated: 2022-11-20
Well, welcome! Honestely this took way longer than I expected it ever would.
I feel like I'm totally shooting myself in the foot - I've seen Fireship's videos and I was itinally hyped about using Svelte to build this site. But then I wanted SSR and SvelteKit's 1.0 had recently been released so now here we are using full blown web framework in order to make a cute blog. Slap on a a self hosted CMS and now things are getting pretty serious.
Long story short, it's overkill, but the awesome thing is even with this relatively heavy stack and the fact that this is hosted on a 5$ VPS, the home page still has a perfect lighthouse score.
Don't get me wrong, this website was an absolute joy to make. But I feel like I skipped alot of the pain associated with learning something like react.
Anyways, all of this is hosted on a cheap VPS from Vultr, and the main site and CMS are both proxied and protected by Cloudflare That way most of the static assets of this site are actually served from their CDN with over 250 PoPs! That right there is most of the reason why this is so fast… and well, Svelte.
CI/CD
I spent a lot of time working on CI/CD to deploy this site without needing me to manually log in to the host and update/pull files. A GitHub action is triggered on push that runs the build script and ships the new code. Currently there's about a 5 second period of downtime as the old site files get deleted, but essentially redeploying everything is really nice because it eliminates any potential configuration drift. Sort of like immutable infrastructure. This makes deployments really easy and cuts down on the headaches such as working development code breaking in production.
Next steps maybe are to spin up a load balancer so we can deploy without downtime. In this case its pretty simple - spin up a new instance, redirect traffic form old one, destroy old instance once no one's connected. Of course, this isn't really necessary for a website this small but mastering deployments is part of the art of devops.