From 69b893544f8b0bd0c35c7444b64762ee363e8da0 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 22 Jun 2023 16:26:01 +0300 Subject: [PATCH] [#5] Use docker compose down command to clean volumes Signed-off-by: Alex Vanin --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1144bac..3ce6dd9 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,13 @@ FROSTFS_GATES_TAG ?= "0.27.0-rc.2" AIO_IMAGE ?= "truecloudlab/frostfs-aio" # Variables for compose -COMPOSE_CMD ?= docker-compose up -d +COMPOSE_CMD_UP ?= docker-compose up -d +COMPOSE_CMD_DOWN ?= docker-compose down + COMPOSE_V2 = "$(shell docker compose version --short | grep -q '^2' && echo true)" ifeq ($(COMPOSE_V2), "true") - COMPOSE_CMD = docker compose up -d --wait + COMPOSE_CMD_UP = docker compose up -d --wait + COMPOSE_CMD_DOWN = docker compose down endif # Variables for S3 @@ -41,15 +44,15 @@ image-aio: # Start AIO up: - @$(COMPOSE_CMD) + @$(COMPOSE_CMD_UP) # Stop AIO down: - @docker-compose down + @$(COMPOSE_CMD_DOWN) # Clean up clean: - @docker volume rm frostfs-aio_data + @$(COMPOSE_CMD_DOWN) --volumes # Generate S3 credentials s3cred: -- 2.45.2