Separate docker volumes for uploads and backups

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.

2 Likes

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.

3 Likes

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

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

2 Likes