How to persistent storage in Strapi V5.
miloshn
FREEOP

a year ago

When I restart (or deploy) something new in strapi, my storage (media) is dropped.

Can you help me, with how to make volume?

I have made volume /strapi_uploads but not help.

Why?

Solved

4 Replies

chandrika
EMPLOYEE

a year ago

Hey there, could you please check out our docs on volumes? https://docs.railway.com/guides/volumes

You might need to correctly mounted to the service and check if mount path is correctly configured to persist data where Strapi expects to store media files.


Status changed to Awaiting User Response Railway about 1 year ago


miloshn
FREEOP

a year ago

Hi @chandrika,

I have created a volume with a path. /public/uploads but not helping....

Strapi official documentation with volumes is:

volumes:

- ./config:/opt/app/config

- ./src:/opt/app/src

- ./package.json:/opt/package.json

- ./yarn.lock:/opt/yarn.lock

- ./.env:/opt/app/.env

- ./public/uploads:/opt/app/public/uploads

But not helping, do you know why?

https://docs.strapi.io/cms/installation/docker#optional-docker-compose


Status changed to Awaiting Railway Response Railway about 1 year ago


kdhoore
PRO

a year ago

Had the same problem; the correct path when you create a volume 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.


echohack
EMPLOYEE

a year ago

Whoa, thank you kdhoore!


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved echohack about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...