crimethinc / website

Ruby on Rails app that powers crimethinc.com
https://crimethinc.com
Creative Commons Zero v1.0 Universal
103 stars 31 forks source link

Improve seeds script (to remove seed data files from repo) #383

Closed veganstraightedge closed 4 years ago

veganstraightedge commented 7 years ago

The problem is that the seed scripts are frozen in time for how the site was first created and archival data was migrated in. The seed scripts haven't really kept up with the site's evolution and definitely not with the site's production data.

Really what we need is a (nightly?) job that creates a db dump from production, strips it of non-public data, and publishes it to an S3 bucket. Then the seed script could download the latest version of the db dump and import that.

If it's easier / better to export the db data to a big JSON file (or a few JSON files, e.g. one per model, etc), instead of a proper pg dump, that's ok too. Though, I think if the pg dump can work, there are bunch of efficiencies that we gain for free. Namely, Heroku db imports on new apps and on staging.


Use cases for this seed data:

veganstraightedge commented 4 years ago

https://github.com/crimethinc/website/pull/1356