Upload media to Mounted Volume in Strapi
cloud-house
HOBBYOP

a year ago

How can I upload media files to Mounted Volume in Strapi to keep them between container restarts and deploys? I mounted volume to /app/public/uploads because this is Strapi uploads directory and everything looks good but after every deploy I have got an "Deployment crashed" email with log:

Starting Container

npm error path /app

npm error command failed

npm error signal SIGTERM

npm error command sh -c strapi start

Deploy is successfully after that, app is working and files are present but I want to avoid this error.

3 Replies

a year ago

make the mount path just /public/uploads


milo

make the mount path just /public/uploads

cloud-house
HOBBYOP

a year ago

I lost images if path is just /public/uploads


cloud-house

I lost images if path is just /public/uploads

kdhoore
PRO

a year ago

Had the same problem; the correct path is '/app/public/uploads'

This was mentioned in the docs here (under the section 'Relative Paths':

https://docs.railway.com/guides/volumes Fyi: It doesn't matter which builder you are using - Nixpacks or Railpack - both need the '/app' prefix.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...