Skip to content

Commit

Permalink
return av, but not the gem yet (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
cziaarm authored Jan 29, 2024
1 parent 522206b commit a8b6868
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ USER root
RUN apk --no-cache upgrade && \
apk --no-cache add \
bash \
clamav \
clamav-daemon \
cmake \
exiftool \
ffmpeg \
Expand Down Expand Up @@ -35,6 +37,11 @@ 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 @@ -98,5 +105,6 @@ 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: 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 && bundle exec sidekiq"
exec "echo $DATABASE_URL && clamd && bundle exec sidekiq"
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: bundle exec sidekiq
command: clamd && bundle exec sidekiq
depends_on:
- check_volumes
- db
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ services:
##
## With the following line, uncommented during active development, we'll
## run bundle then run sidekiq.
# command: sh -l -c "bundle && bundle exec sidekiq"
command: sh -l -c "clamd && 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 a8b6868

Please sign in to comment.