Get access to service's file system
iuvis
FREEOP

3 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?

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

3 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

3 months ago

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



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


iuvis
FREEOP

3 months ago

Okay, thank you for help


Loading...