The technology powering this website

This website is different from most other websites. There's no apache or nginx serving content, NoSQL/SQLdatabase hosting posts or filesystems hosting content.

This website has no server, and I got a bit creative with how content is deployed to it. This post is about how this website is technically delivered.

I wanted to learn something about a few new technologies to build this site, and not be part of the plague that is the wordpress ecosystem.

Content Hosting and Content Delivery: Cloudflare Workers

If you're familiar with the internet you know full well that there is no way there is "no server" here, but that's not what serverless computing means.

Cloudflare workers is my serverless computing platform, which is probably different from even what most people who are in the loop on serverless computing think of when they think of serverless computing. Cloudflare workers allows developers to run javascript via the service workers API at the Cloudflare CDN edge. A developer so-inclined could write a Cloudflare worker that could understand a request and respond to it without ever going to the origin, which is exactly what I did. The origin for this website is actually an ip taken from an nslookup of google.com. 

Content for this website is hosted in workers on the workers-kv platform, every page is stored as a KV entry 

Using Cloudflare workers also means that I'm using Cloudflare's CDN and SSL services at no extra cost, so this website is available globally and very quickly.

Analytics: Also Cloudflare

With the recent announcement of Cloudflare analytics, I kicked Google to the curb and get all my traffic and usage stats right from Cloudflare. This means no need to run any tracking javascript and cookies on the page viewers, and removes all external dependancies. It also means this cannot be blocked by any anti tracking software (like what I run on my pihole and ublock origin).

Content Management System: Publii

I use Publii Static CMS to manage content and look & feel of the website. Publii is an application you run on your local device and there's no subscriptions, accounts, billing, or anything required to get started with it. I'm using the default Publii theme here and find it very easy to ride.

Publii integrates with FTP/SFTP based publishing locations, AWS S3, Google Cloud and also publishing the website contents to a location on your file system. 

I publish the website contents to my file system, where they are later picked up and moved around by...

Deployment: git, Gitlab, Docker

Tying it all together is git, and Gitlab.

After I write a new post or change the site with Publii, it's saved to a git project on my local disk. When I'm feeling read to publish, I commit my change in git and push it to my gitlab project for this website.

When gitlab sees that there is a new commit or pull request merged to the master branch, a gitlab CI/CD job kicks off which updates all the content of this website, and any other changes to the worker that need to be pushed. The gitlab CI/CD job uses a really simple yaml file to understand how to update my website. I store an API token for cloudflare in my gitlab account as a protected environment variable.

Gitlab CI/CD uses docker container images to run the job, however there is no official docker container image of Cloudflare's official CLI tool for workers, wrangler. There was some on dockerhub, but I know better than to trust random docker images from docker hub, so I rolled my own docker container image based on Alpine. It's hosted on dockerhub so that Gitlab can access it.

 

$$$

The total cost of hosting this website is 5$ USD a month, and 15$ a year for a the exit23a.ca domain name. I am sure there are cheaper hosting solutions, but they probably come with a server to manage, or other shady practices. This website is independent, and has no server.

 

So that's it - all those things work together to make a website without a server. Something a real geek can be proud of.