From a3464b9c6ec8fc0b8fe505e69ec65daf631c20fe Mon Sep 17 00:00:00 2001 From: Florian Amsallem Date: Wed, 17 Jul 2024 10:34:25 +0200 Subject: [PATCH] scripts: fix cleanup-db deleting redis cache --- scripts/cleanup-db.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/cleanup-db.sh b/scripts/cleanup-db.sh index b943e26695c..9a90e9fe575 100755 --- a/scripts/cleanup-db.sh +++ b/scripts/cleanup-db.sh @@ -55,6 +55,10 @@ echo "Initialize new database (no migration)..." docker exec osrd-postgres sh -c 'cat /docker-entrypoint-initdb.d/init.sql | tail -n 1 > /tmp/init.sql' docker exec osrd-postgres psql -f //tmp/init.sql > /dev/null +# Clear Redis Cache +echo "Deleting redis cache..." +docker exec osrd-redis redis-cli DEL * &> /dev/null || docker volume rm -f osrd_redis_data > /dev/null + echo "Cleanup done!\n" echo "You may want to apply migrations if you don't load a backup:" echo "'diesel migration run --migration-dir $(dirname $0)/../editoast/migrations' # 'docker compose up editoast' does it automatically"