DEV Community

Discussion on: How to edit files in a Heroku dyno and persist it

Collapse
 
canbax profile image
yusuf

I have a Heroku app which is connected to a GitHub repo. I want to add a file in Heroku. I can do that by using bash command from Heroku cli.

Does the generated file persist? For example when I made a push to my GitHub repo

Collapse
 
askrishnapravin profile image
Krishna Pravin

To add a file to Heroku app, you can push your file to your connected GitHub account.

  • Then if you have enabled Automatic deploys deployment will start.
  • But if you have not enabled auto deploys you have to manually trigger the build.

You can check these settings here: dashboard.heroku.com/apps/your_app...

When this deployment succeeds, your new file will become persistently available in your App.

Collapse
 
canbax profile image
yusuf

but I don't want to push the file to Github. It is a config file, it will be different based on deployment environment

Thread Thread
 
askrishnapravin profile image
Krishna Pravin

Use the Heroku config vars option for environment-specific values.

devcenter.heroku.com/articles/conf...

Thread Thread
 
canbax profile image
yusuf

I think I can't. I'm reading value inside JS code, it should be a file

Thread Thread
 
sayhicoelho profile image
Renan Coelho

Did you find the solution?