about deployment
hey guys, so i wanna ask, when i deploy my apps for the first time
im using this commands for the nixpacks
should i change the nixpacks command when i redeploy the apps into the better version like after bugfixing etc?
i lost the data when i redeploy the apps with the nixpacks
and when i redeploy again with this command
i lost the photo, like this
can i get the link for the picture again? i have no idea and it's frustrating since this is the UAT phase for the apps :((( the app is being developed as my final project for graduation
21 Replies
Project ID:
N/A
N/A
i cleary have the post image link but why it doesn't show?
Railway's default file storage is ephemeral. If you would like your files to persist between deployments, save them to a volume https://docs.railway.app/reference/volumes
should i change the nixpacks command when i redeploy the apps into the better version like after bugfixing etc?I'm not sure what you mean by this. If you need to change your start command, you can change it. Otherwise, there is no need to change it.
i already have the volume here
and also the image path is the same as before, but i dont know why it shows like this
Looks to me like you're storing the png paths in the volume, but not the images themselves
Without more information about your app, I won't be able to help. Are you logging the image finding failures? What's your stack?
this is the logging
do you have a volume on your app? (not the database)
how can i check it?
look at your apps service, does it have a volume?
no it doesnt have any volume
then adam is right, you are only saving data about the file in the database, but arent saving your images anywhere.
have a look at this guide please https://docs.railway.app/guides/volumes
omg okay, i didnt know that before
thank you guys
now i have the volume right?
yes!
now you just need to save the pngs to it, and load them back from it
how can i do it?
not a super railway related question, first read the guide (bottom half of it)
then maybe check out some online guides on how to read/write files from a certain directory
okayy brodyy
have a nice day
you too!