Get the latest tech news

Static sites with Python, uv, Caddy, and Docker


My preferred deployment stack for Python-built static sites.

For our main example we can use my personal deployment of sus, a static site based URL shortener I wrote and have been using for years. And our final step is to copy the output we generated with uv and Python into the location where Caddy expects to find the files to serve: What it lets me to is pretend I’m hosting the actual JS files required for Plausible to work, invisibly proxying the requests to their manager instance.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of Docker

Docker

Photo of Caddy

Caddy

Related news:

News photo

Show HN: OctaneDB – Fast, Open-Source Vector Database for Python

News photo

I run a full Linux desktop in Docker just because I can

News photo

Crimes with Python's Pattern Matching (2022)