Temp files/volumes
rob8624
HOBBYOP

4 months ago

Hi folks, i'm working on a deployed project (django/react) where i am creating/writing to temp files (namedtemp files to be exact). The workflow handles the functionality in my local Docker but in production on railway i'm having problems, Nothing specific as yet, all my debug statements aren't bringing up anything obvious, to narrow it down, hence the question.

Do I need a volume attached to my project for temp files to work correctly?

ProjectId : n/a

$10 Bounty

5 Replies

4 months ago

if youre working with ephermeral temp files it should be fine (i assume theyre small in size), as long as you dont rely on them to persist across builds/restarts


4 months ago

attaching a volume persists the temp files across restarts/deploys, and then youd have to delete them


rob8624
HOBBYOP

4 months ago

Yea. Reading and testing code, i think it's an issue my end between, no race conditions or having to persist these files.


4 months ago

yeah, if you persist them and then delete them after youre done with the temp files, that might fix your issue


rob8624
HOBBYOP

4 months ago

I'm manipulating image metadata (via a JSON file) using Exiftool. It need the filename in the metadata to match the file filename. Mine mismatch in production 🙂 Ok back to work ! 🙂


Loading...