Separate docker volumes for uploads and backups

AI-generated summary

The discussion revolves around separating Docker volumes for uploads and backups in Discourse. schneeland notes that while the default setup uses a single volume for all data except logs, it would be beneficial to separate uploads and backups to different volumes, especially for communities with large file storage needs. This allows for more flexible storage management, such as using slower, cheaper storage for backups and uploads while keeping the database on a faster volume. pfaffman clarifies that this is already possible by modifying the app.yml configuration. Canapin provides a guide for moving uploads and backups to external storage, which has been successfully used with Hetzner, not just DigitalOcean. schneeland thanks the contributors and confirms the thread can be closed, planning to follow the provided guide.

Have a closer look at app.yml and the Discourse docker image again as part of a new install, I was reminded that in the standard install, all data except for logs is handled via a single docker volume.

Now this is probably varying between communities a lot, but if I look at our existing community, a lot of disk space is taken up by backups and also by user uploads. And I think it would be helpful if these two could be moved more easily to another volume (with potentially lower read/write speed), while keeping the database on the primary volume (with higher read/write speed)[1]. This would allow communities with a larger number of uploads to be a bit more lenient in terms of upload size.


  1. As an example: on a Hetzner CX22 VServer, the main disk is faster by roughly a factor 3 compared to additional block storage volumes that can be added to the server. ↩︎

They can. Just change the app.yml to have them be wherever you want. You can have uploads, backups, postgres, any of them all wherever you like.

And here’s the related documentation:

I’m not sure why the guide specifically targets DigitalOcean. I remember doing the same exact steps with Hetzner with no issues.

Thanks! I didn’t realize a container rebuild is all it needs.

Thread can be closed, then. I’ll follow the guide @Canapin linked.