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
Project ID:
b6a98aa2-1b73-4ace-bd6f-938ee3488910
b6a98aa2-1b73-4ace-bd6f-938ee3488910
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
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
if you've a persistent volume, it'll still be there even after redeploys
ok and thats the template you linked
you're talking about the persistent volumes?
https://docs.railway.app/guides/volumes
oh yea im not using one of those yet
should i conmect it to my current service
a volume
yep
ok
what should i put here?
the folder path where your file is stored
nothing shows up, my main service is connected to a github tho does that affect anything
no, do you know where that file is stored inside your bot?
when it runs
yea, its in ./src
but when i enter that
its just red
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>
i dont know where to mount it to, the file im refrencing is in src. sorry my internet is slow
do you want me to make another folder
and put the cooldown file inside that
yep
ok
so then what should i mount it to
and also, are you using a Dockerfile?
no
idt so
yea no
/app/src/<path_to_file_folder>
ok
and just the folder right
not the file
yep
ok
any way to quickley make a folder on github i dont wanna have to upload a new one
in the
name your file
input place a folder_name/
to create itok thanks
hold on while i set everything up
now what?
alright i got it all i think
do i gotta change the volume to the template you sent
or something
yep, you detach the volume to the template and modify through there
and when you're done, just attach to your bot again
ok thanks