4 ms·
I absolutely agree with this opinion. Docker saves me the headache of having to manually reconfigure stuff when I want to spin it up on another machine. It's n
by jzombie 4y ago
I absolutely agree with this opinion.
Docker saves me the headache of having to manually reconfigure stuff when I want to spin it up on another machine. It's not perfect, but it's close enough.
- doubled112 4y agoDocker compose and keep all the data in volumes with the compose file. Makes it absolutely trivial move the service between machines. Backups get easy too, plus if you use ZFS/btrfs you can snapshot per project really easily too, and you only have to grab the data.
- number6 4y agoSnapshot per Project? Sounds interesting. How would you do that?
- doubled112 4y agoQuite simple, assuming you use a filesystem that supports snapshots. I'll assume you're using btrfs, but ZFS works too. You create a subvolume. You create a docker-compose.yml file inside this subvolume. You create a directory beside the docker-compose.yml, and you put ALL of your stored volumes for each container in your project in it. I define the volumes with relative paths so I can just pick up and move the project around. Terrible art incoming: example-project/ <-- this is your subvolume |- docker-compose.yml |- volumes/ |- example-project-psql/ ... files ... |- example-project-conf/ |- configuration.yml |- example-project-redis ... files ... Now when it's time to upgrade, you can snapshot the whole thing. App and DB are both frozen in that point in time, and you proceed not needing to worry about how you will rollback.
- number6 4y agoOk I will do this asap!