This seems simple enough but I can’t find a fix. I have a django app on heroku. I’m using heroku as a staging environment. My app uses a directory media for images and files uploaded from the admin pages.
When I git push heroku master it destroys this directory even though it’s not added in the repo.
How can I stop this?
Heroku doesn’t provide persistent storage.
On
git pushyour code is transformed into a slug and then it is distributed to a dyno that your application runs in. See https://devcenter.heroku.com/articles/slug-compiler for details.If you want persistent storage you should integrate your application with AWS S3 (Simple Storage Service) or some other service.