How to configure S3 Uploads in a multi-site environment?

Per my understanding, This should be done through the env variables but I had a few questions that popped up in my mind.

  1. How to do migrate to s3 for all sites? My understanding is that the per site migrate should be run with RAILS_DB= parameter but is there a more simpler way to implement this across all sites instead of running it multiple times for all the sites?

  2. Is the system able to create it’s folder structure in s3 with multiple sites as well?

  3. For the assets cdn, the same URL works fine for multisite. It it true for the s3 files CDN as well?


Any tips here @vinothkannans?


Rake Command:
rake uploads:migrate_to_s3
FYI: This above rake task will run for all
the databases present in multisite.yml file. You don’t need to run it for each db. I did that earlier for my one of the client and it worked smoothly. If you want to run for specific db then you can just mention RAILS_DB=‘parameter’ . If you will ignore it (RAILS_DB) then it will work for all
the databases present in multisite

Yes that’s true!

Yes that’s true!

I tried these things recently and very confident with that.

Ashish P.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.