Need a how-to guide for using DigitalOcean Block Storage for image uploads

The man makes a point. It appears to be less than 1/3 the speed on the simplest of benchmarks. (I checked and both the host and the storage are at SFO2.)

root#:dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k
1024+0 records in
1024+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 0.590498 s, 682 MB/s
root#:dd if=/dev/zero of=/mnt/volume-sfo2-01/test conv=fdatasync bs=384k count=1k
1024+0 records in
1024+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 1.99937 s, 201 MB/s

It seems to me that moving the images to the other storage is as simple as shutting down Discourse and

cd /var/discourse
./launcher stop app
cd /var/discourse/shared/standalone
mv uploads /mnt/volume-sfo2-01/uploads # script'd need to find this
ln -s /mnt/volume-sfo2-01/uploads .
cd  -
./launcher start app

(Hey, @meglio, there’s your HOWTO :slight_smile:)

Docker images don’t get that big if you purge them periodically, so don’t I understand why to bother moving them. What am I missing?

8 Likes