Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First, make sure you have installed Docker and Docker Compose v2. Then clone the Hyrax repository.

Within your cloned repository (the hyrax directory) is a .koppie directory that contains a test and development application called Koppie. This is similar to Dassie, but with no Fedora server loaded, and any forwarded network ports are incremented from the Dassie value.

Starting Koppie from the hyrax directory using

...

  1. Make sure Dassie is not running: docker-compose down

    1. Note if you have Hyrax running locally from previous builds, you might need to clear out old volumes (which will wipe out local data):

docker

...

compose

...

  1. Build docker images for Koppie: docker - compose -f docker-compose-koppie.yml build

  2. Start Koppie: docker - compose -f docker-compose-koppie.yml up

  3. Load localhost:3000 3001 in a browser.

Koppie runs as a different project than Dassie, so it should be possible to run both concurrently (assuming your workstation has enough RAM).

Running Commands (for testing changes, for example)

With docker-compose -f docker-compose-koppie.yml up running, the Currently Koppie should not be used for running specs, Dassie should be used instead until the specs can be updated for a valkyrie only environment.

Run specs on Dassie

The following shows an example of running rspec on the catalog_controller:

  1. docker

...

  1. compose up

  2. docker compose exec app sh

  3. cd /app/samvera/hyrax-engine/

  4. bundle exec rspec ./spec/controllers/catalog_controller_spec.rb

You may have to run bundle install from inside the the hyrax-engine directory

Run rails console on Koppie

  1. docker compose -f docker-compose-koppie.yml up

  2. docker compose -f docker-compose-koppie.yml exec app bundle exec rails c

Troubleshooting

  • If the postgres service logs show permissions errors, there may be old data from alternate versions of the postgres image. The old data volumes can deleted by using docker compose -f docker-compose-koppie.yml down -v

  • Errors such as exec /app/samvera/hyrax-entrypoint.sh: no such file or directory in the app, sidekiq and db_migrate services may indicate an outdated cached hyrax-base image layer was used to build the koppie image. Try docker compose -f docker-compose-koppie.yml build --no-cache to rebuild all the image layers.

    • It was also seen on a Windows 10 host and was resolved by using the git --core.autocrlf option when cloning the repo.

Reference Documentation

References for Hyrax Development:

...