Geospatial discovery application for Stanford University Libraries, built using GeoBlacklight.
Pull down the code:
git clone git@github.com:sul-dlss/earthworks.git
Unless using Docker (see below), proceed to install dependencies and prepare the database:
bin/setup
Start an Apache Solr instance using solr_wrapper:
solr_wrapper
Finally, start the development web server:
bin/rails server
A more production-like setup using Redis and Postgresql is available via Docker. To create the stack:
docker compose up
Then, to prepare the database:
docker compose exec app bin/setup
Most other commands can be run by prepending docker compose exec app
to the command, which will execute the command in the app
container.
To add a small amount of test records to the Solr index, you can use the seed
task:
bin/rake geoblacklight:solr:seed
You can also fetch records from OpenGeoMetadata using GeoCombine:
export OGM_PATH=tmp/opengeometadata # location to store data
bin/rake geocombine:clone[edu.nyu] # pull data from NYU
bin/rake geocombine:index # index data in Solr
At Stanford, geospatial data is transformed and indexed by the gis-robot-suite.
You can run the full suite of tests with the ci
command. Do not run this while ssh tunneled as it may delete the production index!
bin/rake ci
There is also a separate suite of "data integration" tests, which are intended to be run against a production search index.
export TEST_SOLR_URL=http://example.com:8080/solr/core_name
bin/rake integration