It looks like a simple hugo static website, right? Let’s dig a bit deeper.
If you check its repository, you will notice there’s a Dockerfile in there, so this website is built using Docker and running on nginx.
┌──────────────────────────┐
│ │
│ andreiv.com source code │
│ │
└────────────┬─────────────┘
│
│
▼
┌──────────────────────────┐
│ │
│ ┌──────────────────┐ │
│ │ │ │
│ │ nginx │ │
│ │ │ │
│ └──────────────────┘ │
│ │
│ docker image │
└──────────────────────────┘
Where is this docker image hosted? Well, I’m running docker in a linux container on Proxmox.
┌──────────────────────────┐
│ │
│ andreiv.com source code │
│ │
└────────────┬─────────────┘
│
│
▼
┌─────────────────────────────────────────┐
│ │
│ ┌──────────────────────────────────┐ │
│ │ │ │
│ │ ┌──────────────────────────┐ │ │
│ │ │ │ │ │
│ │ │ ┌──────────────────┐ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ nginx │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ └──────────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ docker image │ │ │
│ │ └──────────────────────────┘ │ │
│ │ │ │
│ │ docker │ │
│ │ linux container │ │
│ └──────────────────────────────────┘ │
│ │
│ │
│ proxmox │
│ │
└─────────────────────────────────────────┘
Let’s go back a bit… how does the source code get there precisely?
Github Actions!
┌──────────────────────────┐
│ │
│ andreiv.com source code │
│ │
└────────────┬─────────────┘
│
▼
┌───────────────────┐
│ │
│ github repo │
│ │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ │
│ github actions │
│ docker build │
│ │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ │
│ dockerhub │
│ │
└─────────┬─────────┘
│
▼
┌─────────────────────────────────────────┐
│ │
│ ┌──────────────────────────────────┐ │
│ │ │ │
│ │ ┌──────────────────────────┐ │ │
│ │ │ │ │ │
│ │ │ ┌──────────────────┐ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ nginx │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ └──────────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ docker image │ │ │
│ │ └──────────────────────────┘ │ │
│ │ │ │
│ │ docker │ │
│ │ linux container │ │
│ └──────────────────────────────────┘ │
│ │
│ │
│ proxmox │
│ │
└─────────────────────────────────────────┘
Alright, but how is this exposed to the internet?
Behind a reverse proxy and a firewall, inside it’s own separate network, of course.
┌──────────────────────────┐
│ │
│ andreiv.com source code │
│ │
└────────────┬─────────────┘
│
▼
┌───────────────────┐
│ │
│ github repo │
│ │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ │
│ github actions │
│ docker build │
│ │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ │
│ dockerhub │
│ │
└─────────┬─────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────┐
│ │
│ ┌──────────────────────────────────┐ ┌───────────────────────────────┐ │
│ │ │ │ │ │
│ │ ┌──────────────────────────┐ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ ┌──────────────────┐ │ │ │ pfsense │ │
│ │ │ │ │ │ │ │ │ │
│ │ │ │ nginx │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │
│ │ │ └──────────────────┘ │ │ │ │ │
│ │ │ │ │ └───────────────────────────────┘ │
│ │ │ docker image │ │ │
│ │ └──────────────────────────┘ │ ┌───────────────────────────────┐ │
│ │ │ │ │ │
│ │ docker │ │ traefik │ │
│ │ linux container │ │ │ │
│ └──────────────────────────────────┘ └───────────────────────────────┘ │
│ │
│ proxmox │
└────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────┐
│ │
│ WAN │
│ │
└────────────────────────────────────────────────────────────────────────────┘
This is getting complicated, let’s zoom in a bit
┌─────────────────────────────────────────────────────────────────────────┐
│ ....................................................................... │
│ . ┌─────────────────────────────────────────────────────────────────┐ . │
│ . │ │ . │
│ . │ ┌─────────────────────────────────────┐ │ . │
│ . │ │ │ │ . │
│ . │ │ ┌────────────────────────────┐ │ │ . │
│ . │ │ │ │ │ │ . │
│ . │ │ │ andreiv.com │ │ │ . │
│ . │ │ └────────────────────────────┘ │ │ . │
│ . │ │ │ │ . │
│ . │ │ nginx │ │ . │
│ . │ └───────────────────┬─────────────────┘ │ . │
│ . │ ▲ │ │ . │
│ . │ │ ▼ │ . │
│ . │ ┌───────────────────────┴───────────────────────────────┐ │ . │
│ . │ │ │ │ . │
│ . │ │ traefik │ │ . │
│ . │ └─────────────────────────────────────────┬─────────────┘ │ . │
│ . │ docker │ │ . │
│ . └──────────────────────────────────────────────┼──────────────────┘ . │
│ . ▲ │ . │
│ ....................................... │ │ . │
│ . │ ▼ . │
│ ┌────────────────────────┬──────────┬───────┴─────────────────────┐ . │
│ │ │ firewall │ │ . │
│ │ pfsense WAN │ IDS │ pfsense LAN │ . │
│ └──────────┬─────────────┴──────────┴─────────────────────────────┘ . │
│ ▲ │ 192.168.0.0 . 192.168.1.0 . │
│ │ │ ................................. │
│ proxmox │ │ │
└───────────┼──┼──────────────────────────────────────────────────────────┘
│ │
│ ▼
┌───────────┴─────────────────────────────────────────────────────────────┐
│ │
│ the interwebs │
│ │
└─────────────────────────────────────────────────────────────────────────┘
That’s it! That’s how this website works.
To be honest, considering all the things that need to go right, it’s impressive it still runs so fast.
…I could have just put it on Vercel or something 🙄