Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks is not persistence in docker #593

Open
FideliusFalcon opened this issue Apr 30, 2024 · 1 comment
Open

Tasks is not persistence in docker #593

FideliusFalcon opened this issue Apr 30, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@FideliusFalcon
Copy link

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?

  • I'm logged in as admin
  • I have not changed the bind volumes
@Rafiot Rafiot added the help wanted Extra attention is needed label Apr 30, 2024
@DGawr
Copy link
Contributor

DGawr commented May 6, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants