When container gets rebuilt, all uploaded files get deleted as they are stored by default under the PROJECT_ROOT which points to an inner container path. The default upstream settings override this:
MEDIA_ROOT=/mnt/volumes/statics/uploaded/
/mnt/volumes/statics/ is a docker volume and should keep the files unless the volumes do not get deleted explicitly (by docker volume rm or docker compose down -v)
Let's take over MEDIA_ROOT andSTATIC_ROOTand place them in thesettings_override.py`.
When container gets rebuilt, all uploaded files get deleted as they are stored by default under the
PROJECT_ROOT
which points to an inner container path. The default upstream settings override this:/mnt/volumes/statics/
is a docker volume and should keep the files unless the volumes do not get deleted explicitly (bydocker volume rm
ordocker compose down -v
)Let's take over
MEDIA_ROOT and
STATIC_ROOTand place them in the
settings_override.py`.