Hi folks. I’m fairly new at the whole Rancher mallarkey, so forgive me if this is simple/old/obvious.
I am setting up a test environment on a local machine to learn Rancher, so will have multiple hosts running RancherOS. In order to allow distributing my persistent data, I thought I’d use NFS on my actual machine in lieu of a sort of NAS/SAN.
I have added some storage to my Rancher setup, in my case called wikifiles
.
I created a test container and mapping a volume of wikifiles:/tmp/testingnfs
worked just fine.
Now my question is how to handle single-file “volumes”. For example, I have a wikijs container that wants a persistent config file mapped, and an SSH key for talking to git. In the basic version, I had it set like this:
volumes:
- /rancher/wiki/config.yml:/var/wiki/config.yml
- /rancher/wiki/id_rsa:/etc/wiki/id_rsa
And now I’d like to move that into the NFS. Can I do that with a single-file rancher-nfs volume without altering the container? Or so I need to mount an entire directory, and then alter the container with a symlink or whatever to put those two files “in place”?
Many thanks,
Mark