From 228ebe329d18cba6a1dcd70dc0dc79d352597a70 Mon Sep 17 00:00:00 2001 From: MYerouPaleBlue <103107572+MYerouPaleBlue@users.noreply.github.com> Date: Sun, 4 Sep 2022 20:49:52 +0300 Subject: [PATCH] Fix Listmonk one-click app (wiping DB every time) (#708) Currently, every time the container is restarted the DB is wiped-out! This is due to `idempotent = false` by default (doc: "make --install run only if the database isn't already setup"). Setting ` --idempotent` ensures that DB will be initialized only if empty (i.e. the first time). [source 1](https://github.com/knadh/listmonk/blob/57dbb9e5dbf11b40ad97bbdfe3c39bb9119baea7/cmd/init.go#L108), [source 2](https://github.com/knadh/listmonk/blob/e99c8ed86b71bbcf8bfb2e5361147cec7137cf75/cmd/install.go#L26), [source 3](https://github.com/knadh/listmonk/blob/e99c8ed86b71bbcf8bfb2e5361147cec7137cf75/cmd/install.go#L46) --- public/v4/apps/listmonk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/v4/apps/listmonk.yml b/public/v4/apps/listmonk.yml index f02651a..5f64f89 100644 --- a/public/v4/apps/listmonk.yml +++ b/public/v4/apps/listmonk.yml @@ -27,7 +27,7 @@ services: containerHttpPort: 9000 dockerfileLines: - FROM listmonk/listmonk:$$cap_listmonk_version - - CMD yes | ./listmonk --install && ./listmonk + - CMD yes | ./listmonk --install --idempotent && ./listmonk volumes: - $$cap_appname-data:/listmonk depends_on: