News for hackers. Stuff that matters.
Re:Ask HN: What Is the Hype with Docker? by number6 on Tuesday October 25, 2022 @04:12AM (#33327621)
Snapshot per Project? Sounds interesting. How would you do that?
Re:Ask HN: What Is the Hype with Docker? by doubled112 on Tuesday October 25, 2022 @08:08PM (#33337956)
Quite 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.
Re:Ask HN: What Is the Hype with Docker? by number6 on Wednesday October 26, 2022 @01:58AM (#33340295)
Ok I will do this asap!