2026-11-20
How this site is built
The stack behind hetsulab.tech — Astro, markdown content, and an nginx alpine image.
Every good lab documents its own build. Here’s how this site works end to end.
Stack
- Astro — static site generator. Markdown content in
src/content/, components insrc/components/. - Content collections —
src/content.config.tsdefines thenotesandprojectsschemas, so every writeup validates its frontmatter at build time. - nginx:alpine — the
Dockerfilejust copiesdist/into the image and serves it. There’s no runtime, no database.
Build
npm install
npm run build # → dist/
npm run preview # local check
Why static?
The kind of thing this site is — writeups, a now page, a project index — has no runtime state worth paying for. A static build is faster, cheaper, and has a smaller attack surface than any server side. The dynamic stuff (monitoring, the start page, VPN, file share) lives on subdomains where it belongs.
Deploy
docker compose up -d --build
That writes dist/ into an nginx image and exposes port 80. The compose.yaml keeps it one command.