From 3ad8c9b4f898d54cee33989822c46a9acdc7ee2b Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Wed, 8 May 2024 11:23:00 -0400 Subject: [PATCH] fix(litestream): only restore if db does not exist --- litestream/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litestream/docker-entrypoint.sh b/litestream/docker-entrypoint.sh index 88c4ccb..a710ad4 100644 --- a/litestream/docker-entrypoint.sh +++ b/litestream/docker-entrypoint.sh @@ -6,8 +6,8 @@ ytt --data-values-env TVAL -f /litestream.template.yaml > /litestream.yml # restore if needed echo "Restoring database from backup..." -/usr/local/bin/litestream restore -config /litestream.yml $TVAL_LOCAL_DB_PATH/state.db -/usr/local/bin/litestream restore -config /litestream.yml $TVAL_LOCAL_DB_PATH/contract.db +/usr/local/bin/litestream restore -if-db-not-exists -config /litestream.yml $TVAL_LOCAL_DB_PATH/state.db +/usr/local/bin/litestream restore -if-db-not-exists -config /litestream.yml $TVAL_LOCAL_DB_PATH/contract.db echo "Starting Litestream for continuous replication..." /usr/local/bin/litestream replicate -config /litestream.yml