Storage is cleaned when i push a new deployment

ca7vinHOBBY

a year ago

Hi everybody,

Im using a Laravel Backend (and i use FilamentPhp 2.0 for my Admin panel) for my application and i noticed that, when i make a new deployment on railway, all my pictures are cleaned from the storage.

I dont know how to fix that, and im still searching a solution

Maybe it's a mistake i did with the ''Custom Build command'' -> php artisan config:clear && php artisan optimize && php artisan storage:link

I know there may be information missing to help me, don't hesitate to let me know!

Kind regards

Calvin

1 Replies

a year ago

That is happening because you are storing files in the empherial container storage, you need to be using a volume for persistence.

https://docs.railway.app/guides/volumes