Static Sites with Python, uv, Caddy, and Docker

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Gives developers a copyable 8-line Dockerfile plus a Caddyfile for deploying static sites with uv and Coolify, replacing bespoke build pipelines.

Read this as

A developer named Nik Kantar wrote a detailed guide showing how he builds and hosts mostly-static websites using Docker, a packaging tool called uv, Python 3.13, and a web server called Caddy. His whole build setup is an 8-line Dockerfile, and he uses a self-hosting platform called Coolify instead of paid services like Heroku or Vercel. The guide explains every line of the configuration files. It is aimed at people who already run websites and want a simple, repeatable hosting recipe.

Kantar's guide shows how a small, 8-line Dockerfile plus a Caddyfile (which also proxies analytics to Plausible) can replace heavier build pipelines for static sites, deployed via self-hosted Coolify rather than paying Heroku or Vercel. Some Hacker News commenters called it over-engineering, but Willison argues it fits an existing Docker-based setup. Readers gain a reusable deployment template and exposure to Coolify as a lower-cost hosting alternative.

The Dockerfile uses a two-stage build: the ghcr.io/astral-sh/uv:debian image with uv running Python 3.13 to execute the 'sus' static site generator via 'uv run --no-dev sus', then the caddy:alpine image serving the /src/output directory from /srv/. The included Caddyfile proxies a subset of requests to Plausible analytics. Deployment is via Coolify across Docker hosts. The approach generalises to any static site generator invocable with uv run; the guide omits performance or cost benchmarks.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

uv Caddy Docker Coolify Plausible Python 3.13 sus

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading