From d96f897a23d60b7985686022f97193f937ae9df7 Mon Sep 17 00:00:00 2001 From: Rodolfo Berrios <20590102+rodber@users.noreply.github.com> Date: Wed, 27 Aug 2025 16:03:01 -0400 Subject: [PATCH] add redis flush --- Makefile | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index e7fcc41..2753323 100644 --- a/Makefile +++ b/Makefile @@ -296,18 +296,7 @@ database-restore: @ls -lh ./backup/${NAMESPACE}_chevereto.sql.gz @echo "🔍 First 20 lines of decompressed dump:" @gzip -dc ./backup/${NAMESPACE}_chevereto.sql.gz | head -n 20 - @echo "🔍 Checking which client is available inside the container..." @docker exec ${CONTAINER_BASENAME}_database sh -c 'command -v mysql || command -v mariadb || echo "no client found"' - @echo "🔍 Ensuring database 'chevereto' exists..." -# @docker exec ${CONTAINER_BASENAME}_database sh -c '\ -# if command -v mysql >/dev/null 2>&1; then \ -# set -x; mysql -u root -ppassword -e "CREATE DATABASE IF NOT EXISTS chevereto;"; \ -# elif command -v mariadb >/dev/null 2>&1; then \ -# set -x; mariadb -u root -ppassword -e "CREATE DATABASE IF NOT EXISTS chevereto;"; \ -# else \ -# echo "Neither mysql nor mariadb client found" >&2; exit 1; \ -# fi' - @echo "🔍 Restoring dump into database 'chevereto'..." @gzip -dc ./backup/${NAMESPACE}_chevereto.sql.gz | \ docker exec -i ${CONTAINER_BASENAME}_database \ sh -c 'set -x; \ @@ -319,6 +308,11 @@ database-restore: echo "Neither mysql nor mariadb client found in container" >&2; exit 1; \ fi' +# kv + +redis-flush: + @docker exec -e REDISCLI_AUTH=redis_password -it ${CONTAINER_BASENAME}_redis redis-cli FLUSHALL + # nginx-proxy proxy: