2 years ago
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.
50 Replies
2 years 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
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
2 years ago
if you've a persistent volume, it'll still be there even after redeploys
2 years ago
you're talking about the persistent volumes?
2 years ago
2 years ago
yep
2 years ago
the folder path where your file is stored
nothing shows up, my main service is connected to a github tho does that affect anything
2 years ago
no, do you know where that file is stored inside your bot?
2 years ago
when it runs
2 years ago
could you tell it to mount it somewhere else? ./src may cause issues
2 years ago
even a folder inside ./src would be good. e.g. ./src/bot-file-folder/file.
i dont know where to mount it to, the file im refrencing is in src. sorry my internet is slow

2 years ago
yep
2 years ago
and also, are you using a Dockerfile?
2 years ago
/app/src/
2 years ago
yep
any way to quickley make a folder on github i dont wanna have to upload a new one
2 years ago
in the name your file input place a folder_name/ to create it
2 years ago
yep, you detach the volume to the template and modify through there
2 years ago
and when you're done, just attach to your bot again

