Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return av, but not the gem yet #513

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading