From 0e470604feb3b6fe2c3648ea9fd9081b0b662ef4 Mon Sep 17 00:00:00 2001 From: Dmitry Dementev Date: Mon, 9 Feb 2026 09:33:54 +0300 Subject: [PATCH] chore(scripts): add make down and clean targets - Why: - intensive development needs quick cluster stop/cleanup commands - current Makefile had only up and pipeline/monitoring targets - What: - add make target down for standard docker compose shutdown - add make target clean for full cleanup with volumes and orphans - update OPERATIONS runbook with new make commands - Check: - make -n down clean --- Makefile | 10 +++++++++- docs/OPERATIONS.md | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec600e8..8b066ef 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,18 @@ -.PHONY: up ddl data transform reload-monitoring recover-monitoring +.PHONY: up down clean ddl data transform reload-monitoring recover-monitoring COMPOSE ?= docker compose up: $(COMPOSE) up -d +# Остановить и удалить контейнеры/сети текущего проекта +down: + $(COMPOSE) down + +# Полная очистка окружения проекта (включая volumes) +clean: + $(COMPOSE) down -v --remove-orphans + ddl: bash ./scripts/apply_clickhouse_ddl.sh diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index efcc33d..ac69d8c 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -7,6 +7,8 @@ Базовые команды: - `make up` (или `docker compose up -d`) +- `make down` (остановить и удалить контейнеры/сети проекта) +- `make clean` (полная очистка: `down -v --remove-orphans`) - `make ddl` (применяет SQL из `sql/ddl/00_databases.sql` и `sql/ddl/*/*.sql` в ClickHouse) - `make data` (пересоздаёт топики и заливает небольшой срез данных в Kafka; полный режим — `FULL=1 make data`) - `make transform` (запускает batch-процесс ODS -> DDS -> DM)