Skip to content

Commit

Permalink
Merge pull request #7 from samvera-labs/adventist-mods
Browse files Browse the repository at this point in the history
get fixes from adventist
  • Loading branch information
ShanaLMoore authored Feb 20, 2024
2 parents 54fc18d + 96a43bf commit 31c7682
Show file tree
Hide file tree
Showing 19 changed files with 1,661 additions and 151 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-test-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
confdir: '/app/samvera/hyrax-webapp/solr/conf'
webTarget: hyku-web
workerTarget: hyku-worker
rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL"

lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.15
with:
webTarget: hyku-web
workerTarget: hyku-worker
rubocop_cmd: "cd .. && bundle && bundle exec rubocop --parallel --format progress"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ scratch.md
*~undo-tree~
.env.*
.DS_Store
/file_cache/

/coverage
18 changes: 17 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
FROM ghcr.io/samvera/hyku/base:latest as hyku-web
FROM ghcr.io/samvera/hyku/base:latest as hyku-knap-base

# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true

# Ensure root permissions for installing Tesseract data
USER root

# Install "best" training data for Tesseract
RUN echo "📚 Installing Tesseract Best (training data)!" && \
wget https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata -O /usr/share/tessdata/eng_best.traineddata

# Switch back to the non-root user for running the application
USER app

FROM hyku-knap-base as hyku-web
RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn install

CMD ./bin/web

FROM hyku-web as hyku-worker
Expand Down
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

Expand All @@ -6,3 +8,11 @@ gemspec

# Start debugger with binding.b [https://github.com/ruby/debug]
# gem "debug", ">= 1.0.0"

gemfile_path = File.expand_path("hyrax-webapp/Gemfile", __dir__)
if File.exist?(gemfile_path)
gemfile = File.read(gemfile_path).split("\n").reject { |l| l.match('knapsack') }
# rubocop:disable Security/Eval
eval(gemfile.join("\n"), binding)
# rubocop:enable Security/Eval
end
Loading

0 comments on commit 31c7682

Please sign in to comment.