Reputation: 378
So I have a Heroku free account. Trying to run my portfolio from it. It uses a json file to contain my blog posts and portfolio information. I can update it through a basic CMS I created for it.
I wrote an article, and saved it, but I woke up the next day and checked, and the article was gone. I tested this theory by trying again with a test article. Again, the next day the article had gone. I was left with just the initial article I pushed to Heroku when I published the project.
Does this mean the Heroku free dyno does not retain the file system, and in-fact re-builds the entire project every time it spins down, then gets spun up again? It certainly appears this way.
Can somebody confirm this for me?
Thanks.
Upvotes: 0
Views: 229
Reputation: 378
Did a little more research. I missed the daily cycling.
This is what Heroku has to say about its file system:
https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted
The Heroku filesystem is ephemeral - that means that any changes to the filesystem whilst the dyno is running only last until that dyno is shut down or restarted. Each dyno boots with a clean copy of the filesystem from the most recent deploy. This is similar to how many container based systems, such as Docker, operate.
In addition, under normal operations dynos will restart every day in a process known as "Cycling".
This bottom quote answers my question. I did not realise the Dyno's were cycled daily, I assumed it was just based on server restart.
Upvotes: 1