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

a year 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

peacocksir
HOBBYOP

a year ago

b6a98aa2-1b73-4ace-bd6f-938ee3488910


a year 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


peacocksir
HOBBYOP

a year ago

Ok thanks I’ll look into it


peacocksir
HOBBYOP

a year ago

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


a year ago

if you've a persistent volume, it'll still be there even after redeploys


peacocksir
HOBBYOP

a year ago

ok and thats the template you linked


a year ago

you're talking about the persistent volumes?


a year ago


peacocksir
HOBBYOP

a year ago

oh yea im not using one of those yet


peacocksir
HOBBYOP

a year ago

should i conmect it to my current service


peacocksir
HOBBYOP

a year ago

a volume


a year ago

yep


peacocksir
HOBBYOP

a year ago

ok


peacocksir
HOBBYOP

a year ago

what should i put here?

1287812283585790000


a year ago

the folder path where your file is stored


peacocksir
HOBBYOP

a year ago

nothing shows up, my main service is connected to a github tho does that affect anything


a year ago

no, do you know where that file is stored inside your bot?


a year ago

when it runs


peacocksir
HOBBYOP

a year ago

yea, its in ./src


peacocksir
HOBBYOP

a year ago

but when i enter that


peacocksir
HOBBYOP

a year ago

its just red


a year ago

could you tell it to mount it somewhere else? ./src may cause issues


a year ago

even a folder inside ./src would be good. e.g. ./src/bot-file-folder/file.


peacocksir
HOBBYOP

a year ago

i dont know where to mount it to, the file im refrencing is in src. sorry my internet is slow

1287813669928829000


peacocksir
HOBBYOP

a year ago

do you want me to make another folder


peacocksir
HOBBYOP

a year ago

and put the cooldown file inside that


a year ago

yep


peacocksir
HOBBYOP

a year ago

ok


peacocksir
HOBBYOP

a year ago

so then what should i mount it to


a year ago

and also, are you using a Dockerfile?


peacocksir
HOBBYOP

a year ago

no


peacocksir
HOBBYOP

a year ago

idt so


peacocksir
HOBBYOP

a year ago

yea no


a year ago

/app/src/


peacocksir
HOBBYOP

a year ago

ok


peacocksir
HOBBYOP

a year ago

and just the folder right


peacocksir
HOBBYOP

a year ago

not the file


a year ago

yep


peacocksir
HOBBYOP

a year ago

ok


peacocksir
HOBBYOP

a year ago

any way to quickley make a folder on github i dont wanna have to upload a new one


a year ago

in the name your file input place a folder_name/ to create it


peacocksir
HOBBYOP

a year ago

ok thanks


peacocksir
HOBBYOP

a year ago

hold on while i set everything up


peacocksir
HOBBYOP

a year ago

now what?


peacocksir
HOBBYOP

a year ago

alright i got it all i think

1287819620228665300


peacocksir
HOBBYOP

a year ago

do i gotta change the volume to the template you sent


peacocksir
HOBBYOP

a year ago

or something


a year ago

yep, you detach the volume to the template and modify through there


a year ago

and when you're done, just attach to your bot again


peacocksir
HOBBYOP

a year ago

ok thanks


Loading...