where can i see files that are created during a deployment?

i have a discord bot that i am hosting on railway, and there is code that creates a json file and adds stuff to it, where can i access this new file? when i check on my GitHub its not there which makes sense but i dont see any option on railway to view for example the files that the bot is running on.
32 Replies
Percy
Percy2mo ago
Project ID: b6a98aa2-1b73-4ace-bd6f-938ee3488910
money_mountain
money_mountainOP2mo ago
b6a98aa2-1b73-4ace-bd6f-938ee3488910
ThallesComH
ThallesComH2mo ago
Railway doesnt provide a natively Railway to view the files, if you've a volume (persistent storage) you could use a file explorer template, you would need to detach the volume from your bot, attach to the file browser template, read the file through the template and then attach again to your bot https://railway.app/template/Nan7Bs
money_mountain
money_mountainOP2mo ago
Ok thanks I’ll look into it one more question tho, if my bot goes down for some reason and errors out, if i have auto restart on without redeploying the service, will it still use the same file from before it errord out or make a new one
ThallesComH
ThallesComH2mo ago
if you've a persistent volume, it'll still be there even after redeploys
money_mountain
money_mountainOP2mo ago
ok and thats the template you linked
ThallesComH
ThallesComH2mo ago
you're talking about the persistent volumes? https://docs.railway.app/guides/volumes
money_mountain
money_mountainOP2mo ago
oh yea im not using one of those yet should i conmect it to my current service a volume
ThallesComH
ThallesComH2mo ago
yep
money_mountain
money_mountainOP2mo ago
ok
money_mountain
money_mountainOP2mo ago
what should i put here?
No description
ThallesComH
ThallesComH2mo ago
the folder path where your file is stored
money_mountain
money_mountainOP2mo ago
nothing shows up, my main service is connected to a github tho does that affect anything
ThallesComH
ThallesComH2mo ago
no, do you know where that file is stored inside your bot? when it runs
money_mountain
money_mountainOP2mo ago
yea, its in ./src but when i enter that its just red
ThallesComH
ThallesComH2mo ago
could you tell it to mount it somewhere else? ./src may cause issues even a folder inside ./src would be good. e.g. ./src/bot-file-folder/file.<extension>
money_mountain
money_mountainOP2mo ago
i dont know where to mount it to, the file im refrencing is in src. sorry my internet is slow
No description
money_mountain
money_mountainOP2mo ago
do you want me to make another folder and put the cooldown file inside that
ThallesComH
ThallesComH2mo ago
yep
money_mountain
money_mountainOP2mo ago
ok so then what should i mount it to
ThallesComH
ThallesComH2mo ago
and also, are you using a Dockerfile?
money_mountain
money_mountainOP2mo ago
no idt so yea no
ThallesComH
ThallesComH2mo ago
/app/src/<path_to_file_folder>
money_mountain
money_mountainOP2mo ago
ok and just the folder right not the file
ThallesComH
ThallesComH2mo ago
yep
money_mountain
money_mountainOP2mo ago
ok any way to quickley make a folder on github i dont wanna have to upload a new one
ThallesComH
ThallesComH2mo ago
in the name your file input place a folder_name/ to create it
money_mountain
money_mountainOP2mo ago
ok thanks hold on while i set everything up now what?
money_mountain
money_mountainOP2mo ago
alright i got it all i think
No description
money_mountain
money_mountainOP2mo ago
do i gotta change the volume to the template you sent or something
ThallesComH
ThallesComH2mo ago
yep, you detach the volume to the template and modify through there and when you're done, just attach to your bot again
money_mountain
money_mountainOP2mo ago
ok thanks
Want results from more Discord servers?
Add your server