NFS on nomad, the modern way

I tried to dive into democratic-csi trying to configure it, but I was crushed from the weight of documentation. I couldn’t make it work, and it would also require running a service on every of our 300 machines.

We are just using docker mounts, which are simple and well understood. Mount option. I think it would be nice to add NFS example to the docs, as I think it’s a common case.

        mount {
          target = "/dir/inside/container"
          volume_options {
            # https://docs.docker.com/compose/compose-file/compose-file-v3/#long-syntax-3
            no_copy = true
            driver_config {
              options {
                type   = "nfs"
                # server name is not needed here, but is nice for debugging
                device = "nfs.server.com:/dir/on/nfs"
                # you can specify readonly here or with readonly=true
                o      = "addr=nfs.server.com,ro"
              }
            }
          }
        }