Cannot find files when I use RAILWAY_VOLUME_MOUNT_PATH
p4vlos
HOBBYOP

a year ago

I was following the instructions from @dev:

You can do this by following these steps:

  1. add brody's Filebrowser template into your service ( right click -> template )

  2. set USE_VOLUME_ROOT to 0

  3. open the filebrowser site and upload the contents of your multimedia folder

  4. disconnect the volume from the filebrowser service

  5. attach the volume to your react service on the path that you expect the multimedia to be

To expand on point 5, if your multimedia is stored in /public/media then you'd want to attach the volume to /app/public/media, that way your service will fetch the multimedia from the right place

Essentially what you're doing here is using Filebrowser to upload your multimedia to a volume and then you're connecting this volume to the place where your multimedia is expected to be

Unfortunately my volume cannot be detected.

I am using GitHub for a Flask Project and I am using a json and a npy file from data/ folder.

I removed my data/ folder from the project. I uploaded my files using the suggested method here, but when I try my project on deployment, it doesn't seem to find the files that are supposed to be in the data folder. I attached the volume in app/data/but unfortunately I get this error:

FileNotFoundError: [Errno 2] No such file or directory: 'data/embeddings.npy'

Any suggestions?

Solved

1 Replies

p4vlos
HOBBYOP

a year ago

After some logging of my App I found that my data are stored in

os.environ.get('RAILWAY_VOLUME_MOUNT_PATH')/storage

Thank you!


Status changed to Solved brody over 1 year ago


Loading...