From 6493f5757ab6dbccd4c20c28d1c809194d68928e Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 24 Jun 2024 12:43:25 +0200 Subject: [PATCH] feat: add clamav option --- deployments/examples/ocis_full/.env | 9 ++++++- deployments/examples/ocis_full/clamav.yml | 29 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 deployments/examples/ocis_full/clamav.yml diff --git a/deployments/examples/ocis_full/.env b/deployments/examples/ocis_full/.env index 3cc62d80e7..d1ce48ba12 100644 --- a/deployments/examples/ocis_full/.env +++ b/deployments/examples/ocis_full/.env @@ -127,6 +127,13 @@ COMPANION_DOMAIN= COMPANION_ONEDRIVE_KEY= COMPANION_ONEDRIVE_SECRET= +## Virusscanner Settings ## +# the leading colon is required to enable the service. +# CLAMAV=:clamav.yml +# Image version of the ClamAV container. +# Defaults to "latest" +CLAMAV_DOCKER_TAG= + ## OnlyOffice Settings ## # the leading colon is required to enable the service.. # ONLYOFFICE=:onlyoffice.yml @@ -147,4 +154,4 @@ INBUCKET_DOMAIN= # This MUST be the last line as it assembles the supplemental compose files to be used. # ALL supplemental configs must be added here, whether commented or not. # Each var must either be empty or contain :path/file.yml -COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${WOPISERVER:-}${COLLABORA:-}${MONITORING:-}${CLOUD_IMPORTER:-}${ONLYOFFICE:-}${INBUCKET:-} +COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${WOPISERVER:-}${COLLABORA:-}${MONITORING:-}${CLOUD_IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${INBUCKET:-} diff --git a/deployments/examples/ocis_full/clamav.yml b/deployments/examples/ocis_full/clamav.yml new file mode 100644 index 0000000000..d6ba937039 --- /dev/null +++ b/deployments/examples/ocis_full/clamav.yml @@ -0,0 +1,29 @@ +--- +services: + ocis: + environment: + ANTIVIRUS_SCANNER_TYPE: "clamav" + ANTIVIRUS_CLAMAV_SOCKET: "/var/run/clamav/clamd.sock" + # enable the antivirus service + OCIS_ADD_RUN_SERVICES: "antivirus" + # configure the antivirus service + POSTPROCESSING_STEPS: "virusscan" + # PROXY_TLS is set to "false", the download url has no https + STORAGE_USERS_DATA_GATEWAY_URL: http://ocis:9200/data + volumes: + - "clamav-socket:/var/run/clamav" + + clamav: + image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest} + networks: + ocis-net: + volumes: + - "clamav-socket:/tmp" + - "clamav-db:/var/lib/clamav" + logging: + driver: "local" + restart: always + +volumes: + clamav-socket: + clamav-db: