From 87ea6162e8759a7c89d57f903b8b674588a60d9b Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:21:42 +0200 Subject: [PATCH] add a tool --- force-recreate.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 force-recreate.sh diff --git a/force-recreate.sh b/force-recreate.sh new file mode 100644 index 00000000..40a500fc --- /dev/null +++ b/force-recreate.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -z "$1" ] || [ ! -f "/root/rpc/$1.yml" ]; then + echo "Error: Either no argument provided or /root/rpc/$1.yml does not exist." + exit 1 +fi + +docker compose up -d --force-recreate $(cat /root/rpc/$1.yml | yaml2json - | jq '.services' | jq -r 'keys[]' | tr '\n' ' ')