This repository includes additional information on how some contributors may be building features to this repository.
- Local site:
- With dory: https://hyku.test
- Without dory: localhost:3000
- Staging site: http://louisville-hyku-staging.notch8.cloud/
- Production site: https://hyku.library.louisville.edu/
- The server credentials are in 1Password
- Solr: http://solr.hyku.test
- Check the
SOLR_ADMIN_USER
andSOLR_ADMIN_PASSWORD
in "docker-compose.yml"
- Check the
- Sidekiq: http://hyku.test/sidekiq
On OS X or Linux we recommend running Dory. Be sure to adjust your ~/.dory.yml file to support the .test tld.
You can still run in development via docker with out Dory, but to do so please uncomment the ports section in docker-compose.yml
gem install dory
dory up
stack_car is optional, but all instructions will be given using this gem. If you choose not to use stack_car, please use the docker-compose equivalents.
gem install stack_car
We distribute two configuration files:
docker-compose.yml
is set up for development / running the specsdocker-compose.production.yml
is for running the Hyku stack in a production setting
- Download Docker Desktop and log in
If this is your first time working in this repo or the Dockerfile has been updated you will need to build your services first
sc build
Note: The sc pull
may require that you login to the registry.
If you get the following error:
Error response from daemon: Head "": denied: access forbidden
Then run the following command. The following command will likely require an access token that can read from the given registry.
docker login <registry url>
sc up
This command starts the web and worker containers allowing Rails to be started or stopped independent of the other services. Once that starts (you'll see the line Listening on tcp://0.0.0.0:3000
to indicate a successful boot), you can view your app at one of the dev URL's above.
sc be rails db:seed
-
In a separate terminal window or tab than the running server, run:
sc sh
-
You need to be inside the container to:
- Access the rails console for debugging
rails c
- Run rspec
rspec
- Recompile the assets
RAILS_ENV=development bundle exec rake assets:precompile
- Press
Ctrl + C
in the window wheresc up
is running - When that's done
sc stop
shuts down the running containers dory down
stops Dory
-
Was the Dockerfile changed on your most recent
git pull
? Refer to the instructions above -
Double check your dory set up
-
Do migrations need to be run?
sc be rails db:migrate
-
Do seeds need to be run?
sc be rails db:seed
-
Issue: Sidekiq isn't working (e.g.: importer/exporter status stays stuck at "pending")
- Try:
sc sh sidekiq
- Try:
-
Issue: Assets don't display correctly (e.g. the text on the homepage is all jumbled)
- Try:
Then recompile the assets using these instructions
dc down -v sc build sc up
- Try:
-
Issue: No default admin set
- Try:
- make sure you're signed in with the user defined at
ENV['INITIAL_ADMIN_EMAIL']
user = User.find_or_create_by(email: ENV['INITIAL_ADMIN_EMAIL']) user.is_superadmin? # if the above returns false, make your user a superadmin # which is what is should have been already because of the seeds user.add_role(:superadmin)
- make sure you're signed in with the user defined at
- Try:
-
You can't access https://hyku.test/sidekiq
- Try: comment out the do block around
mount Sidekiq::Web => '/sidekiq'
in routes.rb
- Try: comment out the do block around
Rubocop can be run in docker locally using either of the options below:
- Outside the container:
sc be rake
- With autocorrect: (learn about the
-a
flag here)sc exec rubocop -a
- Inside the container:
rubocop -a
This is for the admin login on the Shared Research Repository page or when logging in to a specific tenant
- Local:
INITIAL_ADMIN_EMAIL
andINITIAL_ADMIN_PASSWORD
in ".env" - Staging:
INITIAL_ADMIN_EMAIL
andINITIAL_ADMIN_PASSWORD
in "staging-deploy.yaml"
- Change
HYKU_BULKRAX_ENABLED
totrue
in ".env" - Change
//require bulkrax/application
to//= require bulkrax/application
in "application.js" - Change
require bulkrax/application
to*= require bulkrax/application
in "application.css" - Change
HYKU_BULKRAX_ENABLED
totrue
in "docker-compose.yml" (it's in there more than once) - Change the value under
name: HYKU_BULKRAX_ENABLED
totrue
in "staging-deploy.yaml" (it's in there more than once) - Restart the server
- Revert each of the changes above
- Restart the server
- Use the "tmp" folder to organize any csv's and their related files
e.g.
mkdir tmp/yearbooks < -- this is where the csv will live mkdir tmp/yearbooks/files < -- this is where the associated files will live
- Choose "Importers" from the left navbar on the dashboard
- Click "New"
- Fill in the required fields (Refer to this Wiki article for more details about the fields and save options)
- Select the "CSV" parser option
- Choose the "Specify a path on the server" radio button
- Use a path to a csv in the tmp folder
e.g.
/app/samvera/hyrax-webapp/tmp/yearbooks/1999.csv
# TODO(alishaevn): fill this out if/when necessary