Writeable files on free 5$ Trial
notanerdstudent
FREEOP

9 months ago

I have created a python webapp using fast-api. I want to update a certain file that's in my project directory named as "cookies.txt" when the api url is called. Is it possible by writing '/cookies.txt' or is there any other path that should be called by my code?

Solved

20 Replies

notanerdstudent
FREEOP

9 months ago

it was working few hours back but now it aint


notanerdstudent
FREEOP

9 months ago

b1d658d0-4268-403e-b77a-af1d0011ee1f


adam
MODERATOR

9 months ago

A couple points here.

  1. For persistent storage, you'll want to be using Railway's Volumes feature. If you don't, every time you push a commit or update your code, the filesystem will reset and your cookies.txt file will be lost

  2. You'll want to store your cookies.txt file in the volume once you've set that up. The path is up to you, but make sure it's saved in that volume.


notanerdstudent
FREEOP

9 months ago

how long does the free trial take to expire btw?


notanerdstudent
FREEOP

9 months ago

Also I just wanna use my cookies.txt as a temporary file, I dont care if the contents get reset for it


adam
MODERATOR

9 months ago

It was changed recently, I believe it lasts for 30 days or however long it takes for your app to use 5$ worth of resources, whichever is first


notanerdstudent
FREEOP

9 months ago

ohh


adam
MODERATOR

9 months ago

Then your cookies file is saved wherever your code saves it. That's not something I can answer


notanerdstudent
FREEOP

9 months ago

I programmed my code to save the cookie file in the main directory like this

1368272589218119700


notanerdstudent
FREEOP

9 months ago

This is on vs code tho, I do not know the path format to call this file on railway


adam
MODERATOR

9 months ago

It will be the same


adam
MODERATOR

9 months ago

If it's in your app directory locally, it will be in your app directory on Railway


notanerdstudent
FREEOP

9 months ago

does the path require updation then? If you could help me know

1368272978453860600


adam
MODERATOR

9 months ago

To familiarize yourself with the filesystem on Railway, try running the "ls" command through your app and logging it. You'll be able to see all your files and directories in the current folder


adam
MODERATOR

9 months ago

You will have to test for yourself. logging will help you figure out the correct path to use


notanerdstudent
FREEOP

9 months ago

Ah Alright Thanks


notanerdstudent
FREEOP

9 months ago

umm could u help me know how to enter the shell 😅


adam
MODERATOR

9 months ago


adam
MODERATOR

9 months ago

!s


smoothcubegit
HOBBY

9 months ago

This command aint working


Status changed to Solved adam 9 months ago


Loading...