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

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.

Closed

50 Replies

peacocksir
HOBBYOP

2 years ago

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


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

https://railway.app/template/Nan7Bs


peacocksir
HOBBYOP

2 years ago

Ok thanks I’ll look into it


peacocksir
HOBBYOP

2 years 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


2 years ago

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


peacocksir
HOBBYOP

2 years ago

ok and thats the template you linked


2 years ago

you're talking about the persistent volumes?


2 years ago


peacocksir
HOBBYOP

2 years ago

oh yea im not using one of those yet


peacocksir
HOBBYOP

2 years ago

should i conmect it to my current service


peacocksir
HOBBYOP

2 years ago

a volume


2 years ago

yep


peacocksir
HOBBYOP

2 years ago

ok


peacocksir
HOBBYOP

2 years ago

what should i put here?

1287812283585790043


2 years ago

the folder path where your file is stored


peacocksir
HOBBYOP

2 years ago

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


peacocksir
HOBBYOP

2 years ago

yea, its in ./src


peacocksir
HOBBYOP

2 years ago

but when i enter that


peacocksir
HOBBYOP

2 years ago

its just red


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.


peacocksir
HOBBYOP

2 years ago

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

1287813669928828960


peacocksir
HOBBYOP

2 years ago

do you want me to make another folder


peacocksir
HOBBYOP

2 years ago

and put the cooldown file inside that


2 years ago

yep


peacocksir
HOBBYOP

2 years ago

ok


peacocksir
HOBBYOP

2 years ago

so then what should i mount it to


2 years ago

and also, are you using a Dockerfile?


peacocksir
HOBBYOP

2 years ago

no


peacocksir
HOBBYOP

2 years ago

idt so


peacocksir
HOBBYOP

2 years ago

yea no


2 years ago

/app/src/


peacocksir
HOBBYOP

2 years ago

ok


peacocksir
HOBBYOP

2 years ago

and just the folder right


peacocksir
HOBBYOP

2 years ago

not the file


2 years ago

yep


peacocksir
HOBBYOP

2 years ago

ok


peacocksir
HOBBYOP

2 years ago

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


peacocksir
HOBBYOP

2 years ago

ok thanks


peacocksir
HOBBYOP

2 years ago

hold on while i set everything up


peacocksir
HOBBYOP

2 years ago

now what?


peacocksir
HOBBYOP

2 years ago

alright i got it all i think

1287819620228665344


peacocksir
HOBBYOP

2 years ago

do i gotta change the volume to the template you sent


peacocksir
HOBBYOP

2 years ago

or something


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


peacocksir
HOBBYOP

2 years ago

ok thanks


Welcome!

Sign in to your Railway account to join the conversation.

Loading...