Comment on Docker, Truenas, and self-hosting...
TeaWithDani@lemmy.world 1 week ago
I have a directory in my home folder for all my different docker containers. I back that up like my other critical files on my NAS, Backup NAS, cloud storage and external drive. The docker compose files I also upload to my local Git so I can version them. Make the git ignore skip everything that isn’t a .yml
If you would want to spin them up again, yeah you could just copy them in a new place, make sure the docker-compose.yml is at the top and docker-compose pull the image, then docker-compose up. If your yml specifies are your configs are ./ , it’ll know to look for them in the same folder as your yml and begin its file paths there. Anything outside your ./ in theory should be read only or be some kind of data off a NAS that is independent from the service.
Just organize your volumes correctly and you can move the docker container anywhere you want.
So I ahve filesystem backups of the entire thing (using proxmox backup server) and a replicated image of the docker-volume and all subvolumes that’s both snapped locally and replicated to a NAS at my condo about 200 miles away.
I think I’m covered. I even tried brinigng up the server on the Truenas there and it worked like a champ…All I ahve to do is fail my cloudflared over and everything would automatically come up on the remote location without me even having to muck about with DNS.
I don’t mess with Git…I should…but that’s a new set of lessons. :)