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

So, I finally spent a few hours to implement all this, and it worked quite well as by the instructions above.

I had Discourse hosted in a region with no volumes support, so I also had to move to another region first.

Altogether:

  1. Turned off the droplet.
  2. Made a snapshot.
  3. Moved the snapshot to the target region.
  4. Created a new dropled from the given shapshot in the target region.
  5. Attached a volume and did all the work as described in Digital Ocean.
  6. Updated container as by Sam’s recommendation above:

7. Rebuilt the container
8. Updated all API keys to work with the new IP. For example, I had my SparkPost API key locked to a particular IP address.

All done and worked like a charm.

References:

9 Likes

Why would you advise against symlinks?

Yeah be careful here, everyone, as we found out block storage is quite a bit slower than native SSDs. Like one-half to one-third the speed, so…

4 Likes

So what is recommended? Which CAN we move to volumes without too much of performance loss? Does anyone have a 1-2-3 guide? Everyone in this topic seems to have scattered info for advanced crowds, still hoping to find a simple guide.

  1. Let’s say I have /mnt/someStorage/
  2. Edit /var/disocurse/containers/app.yaml section about volumes. Add a -volume … info gets a bit scattered here. Somehow link to somewhere in /mnt/someStorage/somewhere?
  3. ?
1 Like

Hmm, what do you mean by #scriptd need to find this

I mean that volume-sfo2-01 might not be the name of your volume.

1 Like

I’m interested in an official recommendation too. In the meantime, DigitalOcean Block Storage has been working quite well for image uploads for us, except that we do not incur high traffic — just around 200-300k views per month as by Google Analytics.

I didn’t even know you can purge, and sounds a bit scary to a Linux newb. This is why ;D I can move it and forget it

Here’s how to remove extra docker stuff:

./launcher cleanup

You’re really not going to be able to forget it. If you want to forget it, get someone else to do it for you.

3 Likes

If running ./launcher cleanup is “a bit scary to a Linux newb”, you’re really not going to like mounting extra filesystems and moving data around…

4 Likes

That’s why I’m here – I made a backup and I’m asking for a guide much like any of your other guides I followed and it worked fine. Disliking it isn’t going to magically give me more storage on my main drive :wink: asking for a guide like any of the other guides sounds like a fair request. Surely I’m not the only one~ When I first started with Discourse and DO last year, I never used Linux in my life.

If it’s on another volume, if remembering to add +gb to my volume is the worst thing that can happen, I’m game; it’s significantly better than wondering what to do if I run out of space on my main drive.

Would anyone recommend using Digital Ocean Block Storage as opposed to just integrating with Amazon S3 for image uploads?

I’m sure DigitalOcean would.

5 Likes

Last I looked, it claimed to be compatible with the Amazon api, but someone will need to do some work to support it. So right now, your options are to use S3 or (pay someone to) develop a plugin to support it.

1 Like

He’s asking about block storage, not object storage.

2 Likes

In that case, you’re right!

If you don’t have and don’t want to have an account with the Amazon, then block storage is a fine solution. I’ve not bothered to figure out S3 (which doesn’t seem that hard) myself, so I’m using block storage right now!

1 Like

Ah. Was just curious if there were any considerable advantages, given that it’s not as ‘plug-and-play’ to set up. Sounds like more just a matter of preference.

Thanks guys!

S3 has the advantage of serving the files directly as opposed to your server pumping them out.

We now have a howto for using DigitalOcean Block Storage:

6 Likes