Blacklightify a CONTENTdm collection
ruby-jq
bindings, used by fast solr export (brew install oniguruma
, apt-get install libonig-dev
, yum install oniguruma-devel
)$ git clone git@github.com:UMNLibraries/cdm-blacklightify.git cdm-blacklightify
$ cd cdm-blacklightify
$ git flow init
Choose branches (accept defaults):
main
develop
feature/
hotfix/
release/
support/
$ bundle install
$ cp .env.example .env
Fill in missing env var values (@TODO: share via LastPass?)
Build the project database tables and load our test fixtures for development use.
$ bundle exec rails db:migrate
$ bundle exec rails db:fixtures:load
foreman
. This will result in Redis being downloaded, compiled, and started up in tmp/
, Solr being download and/or started via solr_wrapper
using the config at .solr_wrapper.yml
, Sidekiq queuing service starting, and finally, the Rails development web server.$ bundle exec foreman start
OPTIONAL: Starting some services independently is possible if a fast startup is desired, especially when the Sidekiq job queue won't be needed.
# Start solr without the whole foreman suite
$ bundle exec solr_wrapper --config .solr_wrapper.yml
# Start Rails/Puma without the whole foreman suite
# (port 3000, limited to only the local network interface)
$ bundle exec rails server -b 127.0.0.1 -p 3000
Visit http://localhost:3000 in your browser to see your locally running instance
test/fixtures/dev_solr_harvest.json.gz
directly
into Solr. NOTE This will erase your current index.$ bundle exec rake umedia:solr:index_dev
foreman
), run Harvest rake task$ bundle exec rake umedia:index:harvest_dev
As your harvest is running, you can occasionally sent a commit
to Solr to see what documents you have harvested.
$ bundle exec rake umedia:index:commit
# Store all thumbs
$ bundle exec umedia:thumbnails:store
# Store specific thumbs by doc id, space separated
$ DOC_IDS='p16022coll262:172 p16022coll262:173' bundle exec rake umedia:thumbnails:store
# Purge all thumbs
$ bundle exec umedia:thumbnails:purge
# Purge thumbs by doc id, space separated
$ DOC_IDS='p16022coll262:172 p16022coll262:173' bundle exec rake umedia:thumbnails:purge