[#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 <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-07-22 20:15:59 +03:00 committed by Alex Vanin
parent 3102e72cc8
commit f1ecab97bd

View file

@ -102,3 +102,13 @@ env:
@echo MORPH_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(MORPH_CHAIN_PROTOCOL) | awk '{print $$2}')s @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 MAINNET_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(CHAIN_PROTOCOL) | awk '{print $$2}')s
@echo MORPH_MAGIC=$(shell grep 'Magic' $(MORPH_CHAIN_PROTOCOL) | awk '{print $$2}') @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