Report this

What is the reason for this report?

What is the proper way to sync assets with Digital Ocean Space when precompiling assets?

Posted on April 18, 2019

I deployed RoR application using Dokku On Digital Ocean droplet. I’m going to try DO Space CDN. I’d like assets to be synchronised to S3 bucket after run bundle exec rake assets:precompile but I can’t find any info about how should precompiled assets be copied to DO space. I read about ‘asset_sync’ gem but i’m not sure about it. Does anyone have some thoughts?



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.

Because the Spaces API is compatible with AWS S3’s API you should be able to use most of the same gems and tooling that’s pre built for AWS.

For example fog-aws works with DigitalOcean spaces https://github.com/fog/fog-aws

With that in mind you should be able to use asset_sync with Spaces.

Use your DigitalOcean Spaces Key instead of the AWS Key and use ${REGION}.digitaloceanspaces.com as your endpoint instead of the AWS S3 region endpoint.

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.