Comment on Does it ever make sense/is it possible to move certain docker volumes to another physical volume, but not all?

Dave@lemmy.nz ⁨1⁩ ⁨week⁩ ago

I don’t know if this is naughty but I use bind mounts for everything, and docker compose to keep it all together.

You can map directories or even individual files to directories/files on the host computer.

Normally I make a directory for the service then map all volumes inside a ./data directory or something like that. But you could easily bind to different directories. For example for photoprism I mount my photos from a data drive for it to access, mount the main data/database to a directory that gets backed up, and mount the cache to a directory that doesn’t get backed up.

source
Sort:hotnewtop