enhancement: add clamav docker compose example

This commit is contained in:
Florian Schade
2024-05-21 18:49:38 +02:00
parent 3e2a3fe716
commit d9de63b5af
4 changed files with 104 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
document this deployment example in: docs/ocis/deployment/ocis_clamav.md
---
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/ocis_clamav/)
for instructions on how to run this scenario.

View File

@@ -0,0 +1,57 @@
---
version: "3.7"
services:
ocis:
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
entrypoint:
- /bin/sh
# run ocis init to initialize a configuration file with random secrets
# it will fail on subsequent runs, because the config file already exists
# therefore we ignore the error and then start the ocis server
command: [ "-c", "ocis init || true; ocis server" ]
environment:
# setup is for demonstration purposes only;
OCIS_INSECURE: "${INSECURE:-false}"
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
# admin user password
IDM_ADMIN_PASSWORD: "${ADMIN_PASSWORD:-admin}" # this overrides the admin password from the configuration file
# demo users
IDM_CREATE_DEMO_USERS: "${DEMO_USERS:-true}"
# enable the antivirus service
OCIS_ADD_RUN_SERVICES: "antivirus"
# configure the antivirus service
POSTPROCESSING_STEPS: "virusscan"
ANTIVIRUS_SCANNER_TYPE: "clamav"
ANTIVIRUS_CLAMAV_SOCKET: "/var/run/clamav/clamd.sock"
volumes:
- "ocis-config:/etc/ocis"
- "ocis-data:/var/lib/ocis"
- "clamav-socket:/var/run/clamav"
ports:
- 9200:9200
logging:
driver: "local"
restart: always
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:
ocis-config:
ocis-data:
networks:
ocis-net: