Media files should go to a cloud provider (e.g. S3). django-storages should solve this problem.
If the application is behind a CDN (e.g. CloudFront), the webserver (nginx) can serve static files and rely on the CDN to cache them. While we can use S3 to store the files, doing so might be a bit more cumbersome at deployment time with the need to run collectstatic after each deployment. There is also no good way to cleanup old files over time.
Remaining Work
[x] Add django-storages to serve uploaded media files
[ ] Add Terraform to put files behind CloudFront CDN
Media files should go to a cloud provider (e.g. S3). django-storages should solve this problem.
If the application is behind a CDN (e.g. CloudFront), the webserver (nginx) can serve static files and rely on the CDN to cache them. While we can use S3 to store the files, doing so might be a bit more cumbersome at deployment time with the need to run
collectstatic
after each deployment. There is also no good way to cleanup old files over time.Remaining Work