Ok, I respect your opinion, but remember that there are poor souls like me out there that actually love the opposite.
Ok, I respect your opinion, but remember that there are poor souls like me out there that actually love the opposite.
All things being equal, why prefer Docker Compose? From my perspective, a single binary strictly dominates any Docker Compose solution.
My favorite is applications that conflict on ports. So you go to change the port an application is listening on, the docs say PORT env var so you set it, but it doesn't work.
You look through the code (and this is before LLMs) but the config is just a labyrinth of values flowing from god knows where. So you search the repo for PORT and eventually find a PR from 2 weeks ago that changes PORT to ENDPOINT, so you set ENDPOINT, but it still doesn't work.
Then you find an issue that was opened last night that the new `ENDPOINT` value doesn't load from env vars because it conflicts with another ENDPOINT_ prefix on another value, instead you need to create a config.toml and set an `endpoint =` in that, so you do that.
Then you realize that creating an empty config.toml has now overridden all the previously defaulted values into nulls or empty strings, instead you need to run `foo config-defaults > config.toml` and go edit the endpoint one.
Only to realize that there is a secret that the tool uses to encrypt an ephemeral session. if you don't specify one, the tool would auto generate one on startup. The only downside is restarting it logs your client out which isn't a big deal. But now that you switched to config.toml you must set some value there and it can't be empty
Then you're just wondering why the hell did I want to change the port?
A big win with very little effort is systemd starting your docker compose service on boot. You have your systemd config file set `ExecStart` to call your docker-compose command, throw the config file into your systemd folder, and tell systemd to enable it. Docker compose handles the rest.
And if you're running in Windows or Mac it's easier than the OS option usually.
Don't have to look at cli docs to figure out how to run it.
Doesn't have access to my file system, logs are easy.
Easy to migrate to new system.
Easy to upgrade and downgrade. When a new version causes an issue just restart it with an older version.
One directory to backup and restore that contains all the services and their settings.
One distribution method is flexible and can be deployed however you want, the other prescribes solutions and makes any customization difficult.
Most applications do ship in a single container. whether it's a single binary inside, or a bunch of python or js files or shell scripts is a separate issue. If there is a dockerfile then you know how to build the container. a single binary is easier to build the container for yourself, assuming you also know the binary dependencies of that single binary. Like maybe ffmpeg or yt-dl cli on the path?
Applications that ship as a list of containers are a completely different problem. Those applications are either a victim of their own success, or have developers that come from a particular background.
There's lots of solutions, I also find compose hits the sweet spot for integration into my homelab
As podman has improved and compose stacks have improved, I’ve conceded that containers simplify deployment and updates and isolation, and at this point I find for me the benefits more than outweigh the hassles.
Instead of crafting a set of ansible plays that do all the manual native installation steps, I have a relatively lightweight ansible rig that reads containers and relationships desired from a manifest in inventory, then builds or modifies compose files, then just deploys. Much less futzing. And I’m more likely to keep things up to date regularly as a result
Or, increasingly, dispatch codex to handle it for me
In this way I update home assistant across multiple instances now like magic. I don’t even dread it a little anymore
I manage my home server with a script that presumes the service is running on a compose stack. So I can run stuff like `stack freshrss restart`. I don't want to touch my scripts, I just add the compose file to some expected path and the script finds it based on naming conventions.
You trade a bit of upfront setup (I mean barely now in the age of LLMs) for easier automation and flexibility down the road. I use docker compose to run my local dev stack and qa envs, but then can do whatever I want with the containers for prod. Google Cloud Run, Amazon, whatever. Right now I do just actually use docker compose behind nginx in prod, but I've used basically the same docker compose setup for all my projects that aren't large distributed systems in the last 10 years. And when the system gets too big, I refactor it into k8s, but k8s is overkill for like 99% of my personal projects and like 75% of my professional projects.
Or at least i can reinstall any time i want, because i know it won't leave any trash in my filesystem and when reinstalling, it won't reuse those outdated files
All my home server apps are in /apps/app-name/ all have a docker config... All data and configurations are mounts under that directory or to my library. It's really straight forward.
I don't have to hunt for different configuration files, each app has what it needs.
I can spin down, move and get back up in a minute or two. All in a consistent way to the platform.
The overhead for Docker isn't near a full vm, it's maybe 2-3% if that.
Interesting, I run audiobookshelf bare metal on my old laptop that only has 8gb of ram. I've considered using a docker container but my experience using rancher for work is that it sits there chewing up 4GB of ram on my company MBP.
Maybe I'm wrong but I've never seen the point in a self hosted app running in a container when it seems much lighter to just run the app?
On its native Linux, it's a very thin set of isolations from the host OS. Not a full virtual machine.
Basically I want things reliable and low-maintenance and this setup gives me that.
I think you can go very very far with this kind of setup especially if it's just for you.
I have a 10 year old, dual core, 8gb DDR3 laptop serving somewhere around 20 dockers for different kinds of services and it runs just fine. Even 2 clients transcoding some media usually works ok.
PS: It is not currently on, more due to it being a clunky machine with structural problems then the hardware itself. I should get it a 3d printed desktop case
For apps that will have 1-3 users and a few hits a day a sqlite file is far less operational overhead and can be backed up with all of the other files that app has.
I would like to have Debian headless mini servers that consume as less power as possible when nobody needs them, only activate when someone needs them and then drop back to using as less power as possible as fast as possible. I'm not expert enough how to get that done using Docker. Debian just because i have the most experience with that linux OS. Curent pi-hole/samba/navidrome server powers down the 2.5" sata drive and goes to cpu C6/8 state pretty fast, but is avaiable within 2 seconds when needed. Don't have much time to tinker a lot. Sometimes stuff just has to work.
Using Immich without Docker also seems complicated.