Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku deleting files upon git push?

Tags:

git

django

heroku

I have a media folder that stores all my uploaded images during development and I'm pushing my django(1.5.1) project to a dev server on heroku. Inside the media folder I have

media/
    # cache and images were commited before .gitignored was added
    cache/ # store thumbnails
    images/ # store images
    .gitignore

the .gitignore has

*
!.gitignore

The problem is whenever I git push to heroku, all my testing uploads are wiped out by git. Is there a way to deal with this?

like image 489
Derek Avatar asked May 07 '13 21:05

Derek


1 Answers

This isn't an issue with Git, but rather with Heroku. Heroku's file system is ephemeral, and is reset between deploys. Use a service like Amazon S3 to store uploaded files.

like image 130
mipadi Avatar answered Nov 12 '22 12:11

mipadi