• 1 Post
  • 2 Comments
Joined 2 years ago
cake
Cake day: June 7th, 2023

help-circle
  • This has been my thinking too.

    Though after reading mbirth’s comment I realised it’s possible to use named volumes and explicitly tell it where on disk to store the volume:

        volumes:
          - my-named-volume:/data/
    volumes:
      my-named-volume:
        driver: local
        driver_opts:
          type: none
          device: "./folder-next-to-compose-yml"
          # device: "/path/to/well/known/folder"
          o: bind
    

    It’s a bit verbose, but at least I know which folder and partition holds the data, while keeping the benefits of named volumes.