From 2a7587ed789a8b0fd3b03c98b2f6c1482187f874 Mon Sep 17 00:00:00 2001 From: Luke <19363185+mochman@users.noreply.github.com> Date: Fri, 13 Jan 2023 08:11:33 -0500 Subject: [PATCH] chore: docker compose ClamAV optimizations * Update docker-compose.yml Adds a depends_on clause that waits for clamav to be fulyl started before starting pingvin-share. * Update README.md Explains that it may take a minute or two for the app to start while it waits for clamav. * minor refactoring Co-authored-by: Elias Schneider --- README.md | 2 +- docker-compose.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 558fd694..b353beb0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The website is now listening available on `http://localhost:3000`, have fun with With ClamAV the shares get scanned for malicious files and get removed if any found. 1. Add the ClamAV container to the Docker Compose stack (see `docker-compose.yml`) and start the container. -2. As soon as the ClamAV container is ready (when ClamAV logs "socket found, clamd started"), restart the Pingvin Share container with `docker compose restart pingvin-share` +2. Docker will wait for ClamAV to start before starting Pingvin Share. This may take a minute or two. 3. The Pingvin Share logs should now log "ClamAV is active" Please note that ClamAV needs a lot of [ressources](https://docs.clamav.net/manual/Installing/Docker.html#memory-ram-requirements). diff --git a/docker-compose.yml b/docker-compose.yml index 558d697a..cc38e888 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,12 @@ services: - 3000:3000 volumes: - "./data:/opt/app/backend/data" +# Optional: If you add ClamAV, uncomment the following to have ClamAV start first. +# depends_on: +# clamav: +# condition: service_healthy # Optional: Add ClamAV (see README.md) # ClamAV is currently only available for AMD64 see https://github.com/Cisco-Talos/clamav/issues/482 # clamav: # restart: unless-stopped -# image: clamav/clamav \ No newline at end of file +# image: clamav/clamav