Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good way to keep a small amount of state between Heroku deployments?

I have a small Node.js app running on Heroku that currently does not need or have any persistent storage of state.

However, I want to add a feature that requires that a few very small pieces of state (less than 1KB of data) be persisted between deployments.

What is the best way for me to add this state to my Heroku app, while still retaining the ability for this app to be easily deployed with the "Deploy to Heroku" button?

So far the only potential solution I see would involve attaching a free PostgreSQL addon, which seems like massive overkill.

like image 664
Lange Avatar asked Oct 18 '22 16:10

Lange


1 Answers

Addons like Postgres and Redis can still be used with the Heroku Deploy button. Check out this example for how initial table building (via rake and stuff) work: https://blog.heroku.com/introducing_the_app_json_application_manifest

like image 167
Issac Kelly Avatar answered Oct 20 '22 23:10

Issac Kelly