I’m hosting a few services using docker. For something like an openstreetmap tileserver, I’d like it to remain on my SSD because high speed improves performance, and the directory is unlikely to grow and fill the drive.

For other services like NextCloud, speed isn’t as important as storage size, so I might want it on a larger HDD raid.

I know it’s trivial to move the volumes directory to wherever, but can I move some volumes to one directory and some volumes to another?

  • ikidd@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    Well, I know you can define volumes for other filesystem drivers, but with bind mounts, you don’t need to define the bind mount as you do, you can just specify the path directly in the container volumes and it will bind mount it. I was just wondering if there was any actual benefit to defining the volume manually over the simple way.

    • Matt The Horwood@lemmy.horwood.cloud
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      In my case I need to use a named volume for docker swarm, also I can reuse a named volume in other services. If your not using swarm then just a bind mount should be fine

      • ikidd@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        OK, yah, that’s good point about swarms. I’ve generally not used any swarmed filesystem stuff where I needed persistence, just shared databases, so it hasn’t come up.