Is it possible to directly map rancher-nfs subfolders as volumes?

Hi guys.

I have a need to directly map rancher-nfs subfolders as volume.

For example :
I have an sandbox environment using a sandbox folder on a NFS server.

I have 10 web servers, each one with specific nginx conf and web files I would like to store on my nfs server.

for the moment I have to create 2 mounts for each server : server1_conf_nginx, server1_www, server2_conf_nginx, server2_www … and so on …

I’d like to be able to create 2 folders nginx_conf and www and inside as many subfolders as web servers I have.

I don’t manage to directly map it as a volume.

Is it possible to fulfill my needs ?

Many thanks

1 Like

I have the same question.

When you request a new volume from Rancher NFS, it creates a folder, actually, so yes, that will do just what you want.

If you ever destroy/recreate your container, or run multiple containers, as long as they request the same named-volume, the same folder will map.