So I set up my express app and deployed it successfully. I also set up persistent storage and mounted my app to it. However, there is the issue of data not being stored on the disk when the machine is offline. In my Dockerfile, I set up the WORKDIR as /app:
You are absolutely right, the mistake I made was not creating the new dir within app-root where the files were stored. Now by creating this and pointing the files to the absolute path where they would be stored for future purposes, they became accessible and I could read and write from the persistent volume.