diff --git a/buildSrc/src/main/groovy/com/liferay/docker/workspace/environments/Config.groovy b/buildSrc/src/main/groovy/com/liferay/docker/workspace/environments/Config.groovy index dcfc8561..83f2c7cf 100644 --- a/buildSrc/src/main/groovy/com/liferay/docker/workspace/environments/Config.groovy +++ b/buildSrc/src/main/groovy/com/liferay/docker/workspace/environments/Config.groovy @@ -183,6 +183,8 @@ class Config { this.useClustering = this.useLiferay && this.clusterNodes > 0 + this.useClamAV = this.services.contains("clamav") + if (this.services.contains("db2")) { this.databaseType = "db2" this.useDatabase = true @@ -321,6 +323,7 @@ class Config { public String namespace = null public String product = null public List services = new ArrayList() + public boolean useClamAV = false public boolean useClustering = false public boolean useDatabase = false public boolean useDatabaseDB2 = false diff --git a/compose-recipes/clamav/liferay.clamav.yaml b/compose-recipes/clamav/liferay.clamav.yaml new file mode 100644 index 00000000..614097d6 --- /dev/null +++ b/compose-recipes/clamav/liferay.clamav.yaml @@ -0,0 +1,7 @@ +services: + liferay: + depends_on: + clamav: + condition: service_healthy + environment: + - LIFERAY_DL_PERIOD_STORE_PERIOD_ANTIVIRUS_PERIOD_ENABLED=true \ No newline at end of file diff --git a/compose-recipes/clamav/service.clamav.yaml b/compose-recipes/clamav/service.clamav.yaml new file mode 100644 index 00000000..0a902d4d --- /dev/null +++ b/compose-recipes/clamav/service.clamav.yaml @@ -0,0 +1,11 @@ +services: + clamav: + container_name: ${NAMESPACE}-clamav + healthcheck: + interval: 30s + retries: 5 + test: echo 'PING' | nc -w 5 localhost ${CLAMAV_PORT} + timeout: 10s + image: clamav/clamav:${CLAMAV_VERSION} + ports: + - ${CLAMAV_PORT}:3310 \ No newline at end of file diff --git a/configs/common/osgi/configs/com.liferay.antivirus.clamd.scanner.internal.configuration.ClamdAntivirusScannerConfiguration.config b/configs/common/osgi/configs/com.liferay.antivirus.clamd.scanner.internal.configuration.ClamdAntivirusScannerConfiguration.config new file mode 100644 index 00000000..84aa9913 --- /dev/null +++ b/configs/common/osgi/configs/com.liferay.antivirus.clamd.scanner.internal.configuration.ClamdAntivirusScannerConfiguration.config @@ -0,0 +1,3 @@ +hostname="clamav" +port=I"3310" +timeout=I"120000" diff --git a/gradle.properties b/gradle.properties index 89814699..95b1ffcc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -40,6 +40,7 @@ lr.docker.environment.compose.files= # Enable each service or "service" that you would like to include in your # environment. If the value is "true" or "1", the service is enabled. Any other # value (or a blank value) is ignored and disables the service. +lr.docker.environment.service.enabled[clamav]=false lr.docker.environment.service.enabled[db2]=false lr.docker.environment.service.enabled[elasticsearch]=false lr.docker.environment.service.enabled[liferay]=true diff --git a/ports.env b/ports.env index bd015f95..a0198a70 100644 --- a/ports.env +++ b/ports.env @@ -3,6 +3,8 @@ LIFERAY_GOGO_SHELL_PORT=11311-11319 LIFERAY_DEBUG_PORT=8000-8009 LIFERAY_YOURKIT_PORT=10001-10010 +CLAMAV_PORT=3310 + DATABASE_PORT=54321-54330 ELASTICSEARCH_HTTP_PORT=9200-9209 diff --git a/versions.env b/versions.env index 644ac0cd..45abffbe 100644 --- a/versions.env +++ b/versions.env @@ -1,3 +1,4 @@ +CLAMAV_VERSION=1.0.9 DB2_VERSION=11.5.9.0 MARIADB_VERSION=10.6.22-jammy MYSQL_VERSION=8.4.5-oracle