▲ | simonw 5 days ago | |||||||||||||||||||||||||
Almost every other comment in this thread is people complaining this is too complex and over-engineered. I had the opposite reaction when I read this post: I thought it was a very neat, clean and effective way to solve this particular problem - one that took advantage of an excellent stack of software - Caddy, Docker, uv, Plausible, Coolify - and used them all to their advantage. Ignoring caching (which it sounds like the author is going to fix anyway, see their other comments) this is an excellent Dockerfile!
8 lines is all it takes. Nice. And the author then did us the favor of writing up a detailed explanation of every one of them. I learned a few useful new trick from this, particularly around using Caddy with Plausible.This one didn't strike me as over-engineering: I saw it as someone who has thought extremely carefully about their stack, figured out a lightweight pattern that uses each of the tools in that stack as effectively as possible and then documented their setup in the perfect amount of detail. | ||||||||||||||||||||||||||
▲ | oefrha 4 days ago | parent | next [-] | |||||||||||||||||||||||||
People are complaining because
where the default target is simply `uv run --no-dev sus` and the deploy target is simply `rsync -avz --delete ./dist/ host:/path/to/site/` is hell a lot more neat, clean, effective, and lightweight? (And if you care about atomic deployment it's just another command in the deploy target.)I have ~60 static websites deployed on a single small machine at zero marginal cost. I use nginx but I can use caddy just the same. With this "lightweight pattern" I'd be running 60 and counting docker containers for no reason. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | hamdingers 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Meanwhile, my dockerfile for "purely static—hand-crafted artisanal HTML and CSS" is this:
| ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | indigodaddy 4 days ago | parent | prev [-] | |||||||||||||||||||||||||
Here's my dockerfile (hosted on fly). It was done before I knew about uv, but poetry works fine. Anything look wrong or any suggested optimizations? https://raw.githubusercontent.com/jgbrwn/my-upc/refs/heads/m... |