Skip to content

Commit a8b6868

Browse files
authored
return av, but not the gem yet (#513)
1 parent 522206b commit a8b6868

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ USER root
66
RUN apk --no-cache upgrade && \
77
apk --no-cache add \
88
bash \
9+
clamav \
10+
clamav-daemon \
911
cmake \
1012
exiftool \
1113
ffmpeg \
@@ -35,6 +37,11 @@ RUN apk --no-cache upgrade && \
3537
# cargo install rbspy && \
3638
echo "******** Packages Installed *********"
3739

40+
RUN sed -i 's/User clamav/User app/g' /etc/clamav/clamd.conf
41+
RUN mkdir -p /var/run/clamav && chown -R app:app /var/run/clamav
42+
RUN mkdir -p /var/log/clamav && chown -R app:app /var/log/clamav
43+
RUN chown -R app:app /var/lib/clamav
44+
3845
RUN wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-57.tar.gz \
3946
&& tar xf 7.1.0-57.tar.gz \
4047
&& apk --no-cache add \
@@ -98,5 +105,6 @@ RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DAT
98105
CMD ./bin/web
99106

100107
FROM hyku-web as hyku-worker
108+
RUN freshclam
101109
ENV MALLOC_ARENA_MAX=2
102110
CMD ./bin/worker

bin/worker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ else
99
puts 'DATABASE_URL not set, no pool change needed'
1010
end
1111

12-
exec "echo $DATABASE_URL && bundle exec sidekiq"
12+
exec "echo $DATABASE_URL && clamd && bundle exec sidekiq"

docker-compose.production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ services:
126126
target: hyku-worker
127127
args:
128128
- HYKU_BULKRAX_ENABLED=true
129-
command: bundle exec sidekiq
129+
command: clamd && bundle exec sidekiq
130130
depends_on:
131131
- check_volumes
132132
- db

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ services:
182182
##
183183
## With the following line, uncommented during active development, we'll
184184
## run bundle then run sidekiq.
185-
# command: sh -l -c "bundle && bundle exec sidekiq"
185+
command: sh -l -c "clamd && bundle && bundle exec sidekiq"
186186
##
187187
## Similar to the above, except we will bundle and then tell the container
188188
## to wait. You'll then need to bash into the worker container and start

0 commit comments

Comments
 (0)