How to configure multipal NFS volume in the docker-compose


Could anyone let me know how to configure the multipal NFS (sharing folder) volume in the docker-compose file.
I used the below method in the docker-compose file but getting the error.

       driver: local
          type: nfs
          o: "addr=,rw,nolock,async"
          device: ":/mnt/nginx"
    driver: local
      type: nfs
      o: "addr=server,rw,nolock,async"
      device: ":/mnt/db"

Error : invalid mount config for type “bind”: bind source path does not exist: /mnt/nginx

I have created directory under the mnt folder.

I formatted your compose snippet by wrapping it in a Preformated text block.
Next time, please try to format your post according:

In order for us to help you with your volume definition, we need to know how you mount the nfs shares on your host right now (either using the mount command or the fstab entry).