Shallow Thoughts on Containers
I hate Docker.
It takes a lot for me to admit this. There's so many good things about Docker, and nothing all that bad about it.
It's just, every time I see a project that depends on it, I feel there was a little laziness or dated thinking, like ordering shrimp cocktail at the pub.
Usually, you use Docker to spin up postgres, nginx, Caddy, and maybe some logging? Probably overkill for max 100MB of data and a port or two exposed to the internet.
Alternatives: tunnels; embedded databases like lmdb, sqlite/duckdb; cloud databases like Neon, Upstash, Turso. You get better protection, legibility, and scalability.
I'm not sure where I'd rather be on this tradeoff:
10 self-contained Rust binaries with embedded dependencies and static assets
1 Bun runtime with 10 minified JS bundles
Containerizing makes it very portable, but also precludes cross-dependencies that are maybe useful to keep coherent over time. I guess if your code is rock-solid and stable, the Rust binary is worry-free. But then again, what personal software is delightful to never evolve?
I have a bunch of tiny APIs that I want to use across various front-ends. They all kind of jiggle over time, as I add or remove little features. That's kind of how you build software -- put it out, use it, improve it. And as the cost of producing software continues to fall, these little services / micro-services should continue to jitter even more.
For now, I really like how lean, expressive, and flexible Bun lets you operate the entire stack.