Comment on I'm using compose wrong and I know it.

chiisana@lemmy.chiisana.net ⁨11⁩ ⁨months⁩ ago

Multiple compose file, each in their own directory for a stack of services. Running Lemmy? It goes to ~/compose_home/lemmy, with binds for image resized and database as folders inside that directory. Running website? It goes to ~/compose_home/example.com, with its static files, api, and database binds all as folders inside that. Etc etc. Use gateway reverse proxy (I prefer Traefik but each to their own) and have each stack join the network to expose only what you’d need.

Back up is easy, snapshot the volume bind (stop any service individually as needed); moving server for specific stack is easy, just move the directory over to a new system (update gateway info if required); upgrading is easy, just upgrade individual stack and off to the races.

Pulling all stacks into a single compose for the system as a whole is nuts. You lose all the flexibility and gain… nothing?

source
Sort:hotnewtop