Get access to service's file system
iuvis
FREEOP

10 months ago

I have a deployed Node.js application which writes logs into .txt file located in app's directory. Is it possible to read or even write to this file while deploy runtime?

Closed

7 Replies

If you wish to read it, I would suggest either creating a method in your application that allows you to read it directly. Alternatively, you can SSH into the container and cat the file.


Note that having a txt file directly in the container will not persist through redeployments.

To fix this, mount a volume to your service.


iuvis
FREEOP

10 months ago

Yeah that's exact problem I had (it doesn't persist). So I need to read it now without redeploy because there is already some data.


iuvis
FREEOP

10 months ago

So SSH it's a only one way I have?


Yes.


As mentioned above, I would suggest mounting a volume to your service so the logs will persist.


iuvis
FREEOP

10 months ago

Okay, thank you for help


Welcome!

Sign in to your Railway account to join the conversation.

Loading...