after restarting an app some folders/files disappear

Hi all, can someone explain why after I:

  1. ssh into my app
  2. manually create a folder an a file within (using mkdir and touch)
  3. restart and app
  4. ssh again

My manually created folder and file are no longer there but the rest of the app is there of course

Not super strong on all going-to-production stuff (being a developer and all)
Would really appreciate some explaining why that is,

Hi @gabimor—the root filesystem for a Fly Machine is ephemeral by design. It’s reset when the Machine is restarted or the app is redeployed, so files created at runtime won’t be persisted.

For persistent storage, you can look into using volumes with your app. (Here are links to an overview and a step-by-step guide.)

1 Like

Thanks @MatthewIngwersen, I know vaguely about volumes, will read up right away!

My issue is that I’m using node-html-to-image package, which, upon npm install downloads a copy of puppeteer and stores it locally. the thing is the folder it creates vanishes, although it’s part of the npm install command (run by a github action). so node_modules is there, but the folder which is created as a sideeffect to npm i is not. (this folder should be directly under my_app)

hope I was clear, if this is too specific of a problem ill undestand :slight_smile: just thought maybe this is something obvious i’m missing

BTW, my app is a Remix app using the Blues stack for deployment.
Many thanks!

after inspecting I see the docker image doesn’t contain the needed folder side effect downloaded after npm i so this is not is not related to volumes and ephemerality but rather some other issue . Many thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.