I then placed a mytext.txt in the "/home/server/docker/shared" folder.
My assumption was/is that I would then be able to access the "/sharedfolder' within node red but when I try to write data to a text file I get the following error
"failed to append to file: Error: ENOENT: no such file or directory, open '/sharedfolder/mytext.txt'"
Writing to data to a /data/test.txt file works without a problem.
Am I accessing the folder/file incorrectly?
I had the same issue with access or create files/folders on my NAS drive .. I made a small write-up on how to bind your NAS Shared-Drives to docker here
Thank you for all the feedback , I did some further reading as suggested and the solution seems to be that you need to "link" the folders within the /data/ folder so your docker compose should look like this.
Then before you deploy the container create the folder 'sharedfolder' within the "node_red_data".
So you will have "/node_red_data/sharedfolder" on the real world.
I sort off expected for docker compose to do this but I am in no way an expert here and are just fiddling until I get it right
I have tested this, and it works. If you create a file in NR the file will be created in the " /home/server/docker/shared" directory , the "/node_red_data/sharedfolder" folder will remain empty.
Hope this will help someone later.