Using App Platorm for Wagtail CMS site. How to store media files?

Posted December 1, 2020 725 views
DockerDjangoDigitalOcean App Platform

I’ve been reading the tutorials on how to deploy a Django site and for the most part it all makes sense. I’m wondering if there’s a limitation with the app platform though… is it possible to store media uploaded by users of the content management service I’m deploying? As far as I understand anything written to the docker container will be erased on each deployment and I don’t see how to map directories in permanent storage to the docker image directories. Is this a use case for a more advanced setup?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I think you have two options here, either using DigitalOcean block storage or using DigitalOcean Spaces object storage.

If you want access control for the content uploaded to your CMS application, which I assume you do, you can use DigitalOcean Spaces Object storage with Django package like django-storages:

Note that the environment variable names include AWS, this is because Spaces is S3-compatible.