Report this

What is the reason for this report?

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

Posted on December 1, 2020

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?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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:

https://django-storages.readthedocs.io/en/latest/backends/digital-ocean-spaces.html

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.