pandora-analysis / pandora

Pandora is an analysis framework to discover if a file is suspicious and conveniently show the results
https://pandora.circl.lu/
GNU Affero General Public License v3.0
246 stars 38 forks source link

Tasks is not persistence in docker #593

Open FideliusFalcon opened 2 months ago

FideliusFalcon commented 2 months ago

I'm running the standard docker-compose config, but I tasks is missing after a docker compose down/up. Is there something I need to do to make the tasks persistence logs?

DGawr commented 2 months ago

The problem seems to be, that the Kvrocks DB is not persistent in the current docker-compose.yml. The Kvrocks container uses /var/lib/kvrocks as default location which is not overwritten correctly by the config file (it looks like Kvrocks ignores the -c parameter - maybe because it's already used in the container's entrypoint).

Quick workaround:

diff --git a/docker-compose.yml b/docker-compose.yml
index 78d71bd..97a8a41 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,8 +5,8 @@ services:
     image: apache/kvrocks
     working_dir: /kvrocks
     volumes:
-        - ./storage:/kvrocks/conf
-    command: ["-c", "/kvrocks/conf/kvrocks.conf", "--log-dir", "stdout"]
+        - ./storage:/var/lib/kvrocks
+    command: ["--log-dir", "stdout"]
     healthcheck:
       test: ["CMD", "redis-cli", "-h", "127.0.0.1", "-p", "6101", "ping"]
       interval: 10s

This should store the DB in storage so it's persistent even if the container is deleted.

Edit: Okay, that doesn't seem to fix it completely...