A Samvera Hyrax based image cataloging application.
Features a IIIF manifest structure editor, bulk import using Bulkrax, and flexible metadata using Allinson Flex.
To set up a development environment via Docker Compose:
docker
and docker-compose
commands are installed and functionalcd
into the essi
directory.env
file, set USER_ID and GROUP_ID to match your user. Determine using id -u
and id -g
respectively.openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout ./tmp/certs/localhost.key -out ./tmp/certs/localhost.crt
docker-compose build
docker-compose up
docker-compose ps
from the essi
directory
.env.development
error, add an empty .env.development
file and re-run docker-compose up
docker-compose ps
for port numbers.docker-compose exec essi bash
bundle exec rails c
to access the Rails console.
User.first.roles << Role.find_or_create_by(name: 'admin')
To DELETE the docker-compose data volumes and restart with a clean slate: From the essi
directory: docker-compose down -v
sc exec -s solr 'solr-precreate hydra-test /opt/config'
For a Hyrax specific guide and setup, please refer to the Hyrax Development Guide at https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide
**Optional:
If using a Mac, it is possible to watch the feature specs run through the browser by removing the headless flag in spec/support/capybara.rb, and connecting the Screen Sharing application to your IP address and port 5959. Please note, the server must be running.
When building and deploying to a local developer's machine, the copy and ignore rules allow the db/development.sqlite3
file, which is the default database file if no further configuration changes are made, to be copied in from the local directory into the running container. This gets around the issue of not having a properly migrated database in place when the Rails app starts. One benefit of including the developer's database file in the build is that the running Rails app in the container will be identical to the when it is running as a local Rails app because the database will be the same and presumably be pointed to the same Fedora/Solr.
git clone (cd to cloned directory)
bundle exec rake db:migrate
In separate windows, provide Fedora/Solr for the container:
solr_wrapper fcrepo_wrapper Once Fedora/Solr are running, create the AdminSet in the local app directory: bundle exec rails hyrax:default_admin_set:create Now build and run: docker build --tag=essi . docker run --net="host" -p 3000:3000 essi Notes:
A local instance of Redis should also be running on the host machine. If using Docker for Mac, all localhost and 127.0.0.1 references should be replaced with host.docker.internal in config/essi_config.example.yml.
Follow Hyrax's basic prerequisites, make sure everything is running.
besides Hyrax's basic prerequisites, install yarn
Go to Github repo, fork your master branch
in your local terminal :
git clone https://github.com/IU-Libraries-Joint-Development/essi.git
cd essi
bundle install
bundle exec rake db:migrate
bundle exec rake hyrax:default_collection_types:create
bundle exec rake hyrax:workflow:load
bundle exec rake hyrax:default_admin_set:create
In rails console, type following to create admin user for yourself:
User.find_by_email('username@iu.edu').roles<<Role.find_or_create_by(name:'admin')