Skip to content

Commit

Permalink
Revert "Clamby" (#503)
Browse files Browse the repository at this point in the history
* Revert "Clamby (#496)"

This reverts commit 5e037cd.

* keep branding image fix
  • Loading branch information
cziaarm authored Jan 2, 2024
1 parent 5e037cd commit 592de50
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 114 deletions.
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ USER root
RUN apk --no-cache upgrade && \
apk --no-cache add \
bash \
clamav \
clamav-daemon \
cmake \
exiftool \
ffmpeg \
Expand Down Expand Up @@ -37,11 +35,6 @@ RUN apk --no-cache upgrade && \
# cargo install rbspy && \
echo "******** Packages Installed *********"

RUN sed -i 's/User clamav/User app/g' /etc/clamav/clamd.conf
RUN mkdir -p /var/run/clamav && chown -R app:app /var/run/clamav
RUN mkdir -p /var/log/clamav && chown -R app:app /var/log/clamav
RUN chown -R app:app /var/lib/clamav

RUN wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-57.tar.gz \
&& tar xf 7.1.0-57.tar.gz \
&& apk --no-cache add \
Expand Down Expand Up @@ -106,6 +99,5 @@ RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DAT
CMD ./bin/web

FROM hyku-web as hyku-worker
RUN freshclam
ENV MALLOC_ARENA_MAX=2
CMD ./bin/worker
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,3 @@ gem 'tether-rails'
gem 'validate_url'
gem 'hyrax-v2_graph_indexer', "~> 0.5", git: 'https://github.com/scientist-softserv/hyrax-v2_graph_indexer.git', ref: '53b0a2d28868af25d306bc361634439c008892ac'
gem 'iiif_print', git: 'https://github.com/scientist-softserv/iiif_print.git'
#clamby (for which interface has been back-ported from Hydra 2.0)
gem 'clamby'
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ GEM
citeproc-ruby (1.1.14)
citeproc (~> 1.0, >= 1.0.9)
csl (~> 1.6)
clamby (1.6.10)
clipboard-rails (1.7.1)
cocoon (1.2.15)
code_analyzer (0.5.2)
Expand Down Expand Up @@ -1269,7 +1268,6 @@ DEPENDENCIES
capybara
capybara-screenshot (~> 1.0)
carrierwave-aws (~> 1.3)
clamby
cocoon
codemirror-rails
coffee-rails (~> 4.2)
Expand Down
69 changes: 0 additions & 69 deletions app/jobs/attach_files_to_work_job.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/lib/hyc/virus_scanner.rb

This file was deleted.

2 changes: 1 addition & 1 deletion bin/worker
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ else
puts 'DATABASE_URL not set, no pool change needed'
end

exec "echo $DATABASE_URL && clamd && bundle exec sidekiq"
exec "echo $DATABASE_URL && bundle exec sidekiq"
20 changes: 1 addition & 19 deletions config/initializers/clamav.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
# Pre Hyrax 3.5 we will overide use of clamav gem and use clamby
# Inspired by https://github.com/UNC-Libraries/hy-c/commit/57c84bd0fdfb9ee8b00cc70194971c3fe9fea265#diff-8b7db4d5cc4b8f6dc8feb7030baa2478
Hydra::Works.default_system_virus_scanner = Hyc::VirusScanner

Clamby.configure({
:check => false,
:daemonize => true,
:config_file => nil,
:error_clamscan_missing => true,
:error_clamscan_client_error => false,
:error_file_missing => true,
:error_file_virus => false,
:fdpass => true,
:stream => false,
:output_level => 'medium', # one of 'off', 'low', 'medium', 'high'
:executable_path_clamscan => 'clamscan',
:executable_path_clamdscan => 'clamdscan',
:executable_path_freshclam => 'freshclam',
})
ClamAV.instance.loaddb if defined? ClamAV
2 changes: 1 addition & 1 deletion docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ services:
target: hyku-worker
args:
- HYKU_BULKRAX_ENABLED=true
command: clamd && bundle exec sidekiq
command: bundle exec sidekiq
depends_on:
- check_volumes
- db
Expand Down
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ services:
&& runuser -u solr -- solr-foreground"
expose:
- 8983
# ports:
# - 8983:8983
volumes:
- solr:/var/solr
networks:
Expand Down Expand Up @@ -142,7 +140,7 @@ services:
## With the following line, uncommented during active development, we'll
## run bundle then boot the web-server.
##
command: sh -l -c "bundle && bundle exec puma -v -b tcp://0.0.0.0:3000"
# command: sh -l -c "bundle && bundle exec puma -v -b tcp://0.0.0.0:3000"
##
## Similar to the above, except we will bundle and then tell the container
## to wait. You'll then need to bash into the web container and start the
Expand Down Expand Up @@ -184,7 +182,7 @@ services:
##
## With the following line, uncommented during active development, we'll
## run bundle then run sidekiq.
command: sh -l -c "clamd && bundle && bundle exec sidekiq"
# command: sh -l -c "bundle && bundle exec sidekiq"
##
## Similar to the above, except we will bundle and then tell the container
## to wait. You'll then need to bash into the worker container and start
Expand Down

0 comments on commit 592de50

Please sign in to comment.