-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ClamAV in Containers (attempt 2) (#16561) * use clamav container for local development and review instances * rubocop formatting & CODEOWNERS * fix Dockerfile * update CODEOWNERS and docker-compose version for review instances * change docker-compose verions for review * fix review ports * update github workflows to match k8s * update github workflows * update code_checks for docker compose for tests * add bundle exec to setup db step in audit service tags * reset db in docker compose review & update audit service tag docker services * remove clamd and freshclam from procfile * add sidekiq enterprise license to test env var * set sidekiq license to docker build args * update makefile to work with new docker services * add clamav host & port to settings * add restart services to docker-compose review * Added virus scan to uploads spec (#16393) * Added virus scan to uploads spec * Fixing Virus scan spec * resolve merge conflict * change directory from /app to /srv/vets-api/src * use previous master version for RI + clam containers * add USER_ID to RI docker-compose * set working directory back to app * minor clean up with new line EOF & remove k8s deploy related code * update makefile up command with foreman * fix docker-compose clamav new line * more cleanup and rubocop formatting * remove redis ports from docker-compose test * update redis port * revert docker-compose test to original master * update api service name to web * rubocop formatting * add Procfile to CODEOWNERS * update CODEOWNERS * add secret and pki volumes back to RI * add some settings in review docker-compose * fix merge conflict mistake in Dockerfile * update dockerfile ruby version * add working directory to test docker-compose * update volumes in docker test * update shared volume in review docker compose * revert review docker compose changes * update srv/vets-api/* dir to app/* * update clamav to use sockets * remove working_dir from docker-compose test --------- Co-authored-by: Rachal Cassity <[email protected]> * next instead of break (#16575) * remove codechecks from k8s --------- Co-authored-by: Rachal Cassity <[email protected]> Co-authored-by: Seth Darr <[email protected]>
- Loading branch information
1 parent
7612365
commit 8107f13
Showing
38 changed files
with
346 additions
and
168 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
web: bundle exec puma -p 3000 -C ./config/puma.rb | ||
job: bundle exec sidekiq -q critical,4 -q tasker,3 -q default,2 -q low,1 | ||
freshclam: /usr/bin/freshclam -d --config-file=config/freshclam.conf | ||
clamd: /usr/sbin/clamd -c config/clamd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
Foreground yes | ||
DatabaseDirectory /srv/vets-api/clamav/database | ||
LocalSocket /srv/vets-api/clamav/clamd.ctl | ||
TCPSocket 3310 | ||
TCPAddr 127.0.0.1 | ||
TCPAddr 127.0.0.1 | ||
|
||
LogSyslog yes | ||
LogVerbose yes | ||
ExtendedDetectionInfo yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Foreground yes | ||
PidFile /srv/vets-api/clamav/freshclam.pid | ||
PidFile /app/clamav/freshclam.pid | ||
Checks 8 | ||
DatabaseDirectory /srv/vets-api/clamav/database | ||
DatabaseDirectory /app/clamav/database | ||
PrivateMirror dsva-vetsgov-utility-clamav.s3-us-gov-west-1.amazonaws.com | ||
NotifyClamd /srv/vets-api/src/config/clamd.conf | ||
NotifyClamd /app/config/clamd.conf | ||
ReceiveTimeout 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
if Rails.env.development? | ||
# If running ClamAV through container | ||
# Update host and port on settings.local.yml to override the socket | ||
ENV['CLAMD_TCP_HOST'] = Settings.clamav.host | ||
ENV['CLAMD_TCP_PORT'] = Settings.clamav.port | ||
|
||
# If running ClamAV natively (via daemon) | ||
# Update host and port on settings.local.yml to override the tcp connection | ||
ENV['CLAMD_UNIX_SOCKET'] = '/usr/local/etc/clamav/clamd.sock' | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.4' | ||
services: | ||
clamav: | ||
volumes: | ||
- shared-vol:/vets-api | ||
image: clamav/clamav | ||
ports: | ||
- 33100:3310 | ||
volumes: | ||
shared-vol: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.