Load Private Key to Heroku
As you know Heroku runs ephemeral filesystem which doesn’t allow us to store any arbitrary file beside the actual application repository, but pushing keys to the respository seems like a bad idea…
So, what to do?
The answer is simple, use Config Vars:
1
|
|
And then, somewhere in your code, read the key like this:
1
|
|
Enjoy!