From f1ecab97bd1bbb72170f70893be781c7c661f3be Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 22 Jul 2021 20:15:59 +0300 Subject: [PATCH] [#121] Makefile: Add target to restart storage nodes with volume clean Can be used for test suits without full neofs-dev-env restart. Signed-off-by: Alex Vanin --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 05a1204..5fd2b71 100644 --- a/Makefile +++ b/Makefile @@ -102,3 +102,13 @@ env: @echo MORPH_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(MORPH_CHAIN_PROTOCOL) | awk '{print $$2}')s @echo MAINNET_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(CHAIN_PROTOCOL) | awk '{print $$2}')s @echo MORPH_MAGIC=$(shell grep 'Magic' $(MORPH_CHAIN_PROTOCOL) | awk '{print $$2}') + +# Restart storage nodes with clean volumes +.PHONY: restart.storage-clean +restart.storage-clean: + @docker-compose -f ./services/storage/docker-compose.yml down + @$(foreach vol, \ + $(shell docker-compose -f services/storage/docker-compose.yml config --volumes),\ + docker volume rm storage_$(vol);) + @docker-compose -f ./services/storage/docker-compose.yml up -d +