From 6dcb087ed4bbf5f9f60375d02b12068c65895d51 Mon Sep 17 00:00:00 2001 From: namalier Date: Wed, 12 Aug 2026 15:30:31 +0200 Subject: [PATCH] Error handled Makefile --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 72d662c..2eafadc 100644 --- a/Makefile +++ b/Makefile @@ -134,20 +134,12 @@ ps: ## List running containers clean: ## Stop everything and remove named volumes (wipes the DB!) $(COMPOSE) $(COMPOSE_DEV) down -v 2>/dev/null || true - $(COMPOSE) $(COMPOSE_PROD) down -v + $(COMPOSE) $(COMPOSE_PROD) down -v 2>/dev/null || true fclean: clean ## Full clean: also remove certs and prune Docker images rm -rf $(CERT_DIR) rm -rf frontend/node_modules - @# backend/dist is a container artefact. The dev image runs as USER node - @# (uid 1000), so it lands owned by the host user and plain rm works. - @# Trees left by images built before that switch are root-owned and only - @# a container that *is* root can unlink them -- hence the fallback, which - @# also spares us re-pulling node:20-alpine after every prune -af below. - @# Leading '-': a missing daemon must not skip the prune below. - -rm -rf backend/dist backend/node_modules 2>/dev/null || \ - docker run --rm -v $(CURDIR)/backend:/host:z node:20-alpine \ - rm -rf /host/dist /host/node_modules + rm -rf backend/dist backend/node_modules docker system prune -af .PHONY: help env certs up down re dev dev-down migrate migrate-dev studio logs \