A Spotlight application for Princeton University Library, formerly known as Pomegranate, but renamed to the offical brand: Digital PUL.
- Ruby
- Nodejs
- Java (to run Solr server)
- Postgres
- Redis
git clone [email protected]:pulibrary/dpul.git
cd dpul
lpass login [email protected]
bin/setup_keys
bundle install
yarn install
Remember you'll need to run bundle install
and yarn install
on an ongoing basis as dependencies are updated.
Lando will automatically set up docker images for Solr and Postgres which match
the versions we use in Production. The ports will not collide with any other
projects you're using Solr/Postgres for, and you can easily clean up with lando destroy
or turn off all services with lando poweroff
.
- Install Lando DMG from https://github.com/lando/lando/releases
rake servers:start
bundle exec rspec
- Run each of the services listed below in its own terminal as necessary.
backend: bin/rails s frontend: bin/vite dev sidekiq: bundle exec sidekiq
- Access DPUL at http://localhost:3000/
- Log in once via CAS
- Run
rake dpul:site_admin
- Click "Create a New Collection"
- Select a small collection and hit "Save"
- To find a small collection: go to Figgy, submit a blank search, open the facet collection and click 'more', and page to the low-count collections
- Either wait for a solr commit or manually commit in the rails console with
Blacklight.default_index.connection.commit
Auto-update from Figgy
Figgy announces events to a durable RabbitMQ fanout exchange. In order to use them, do the following:
- Configure the
events
settings inconfig/config.yml
- Run
WORKERS=FiggyEventHandler rake sneakers:run
This will subscribe to the events and update the DPUL records when they're created, updated, or deleted.
To ensure production or staging indexes are up to date:
- ssh as the deploy user
cd /opt/dpul/current
bundle exec rake dpul:reindex:collections
Note that this enqueues indexing for each collection, and actual indexing is run via background jobs. On DPUL, indexing a collection also deletes records that have been removed from the collection.
- Note it will default to today's backups unless you supply an env var like
DATE=2021-10-21
ssh pulsys@dpul-staging1 'sudo service nginx stop' && bundle exec cap staging replicate:to_staging && ssh pulsys@dpul-staging1 'sudo service nginx start'