#about deployment

26 messages · Page 1 of 1 (latest)

worthy tree
#

hey guys, so i wanna ask, when i deploy my apps for the first time

im using this commands for the nixpacks
composer install && php artisan optimize && php artisan storage:link && php artisan migrate --force

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 composer install && php artisan optimize && php artisan storage:link && php artisan migrate:refresh --force

and when i redeploy again with this command
composer install && php artisan optimize && php artisan migrate --force

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

tardy geodeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

upper willowBOT
#

Project ID: N/A

worthy tree
#

N/A

#

i cleary have the post image link but why it doesn't show?

meager geode
#

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.

worthy tree
#

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

meager geode
#

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?

worthy tree
#

this is the logging

trim bough
#

do you have a volume on your app? (not the database)

worthy tree
trim bough
#

look at your apps service, does it have a volume?

worthy tree
#

no it doesnt have any volume

trim bough
worthy tree
#

omg okay, i didnt know that before

#

thank you guys

#

now i have the volume right?

trim bough
#

yes!

#

now you just need to save the pngs to it, and load them back from it

trim bough
#

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

worthy tree
#

okayy brodyy

#

have a nice day