diff --git a/Makefile b/Makefile index 77f9a75..cd99bc9 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,21 @@ restart: # =============================== # 🔄 Atualizar projeto # =============================== -update: nuke-project install +update: + @echo "🛑 Parando e removendo containers do profile 'app' ($(PROJECT_NAME))..." + docker compose \ + --project-name $(PROJECT_NAME) \ + --env-file $(ENV_FILE) \ + --profile app \ + -f $(COMPOSE_FILE) \ + down --remove-orphans + + @echo "🖼️ Removendo imagens antigas do projeto (seventhltda)..." + - docker images --format '{{.Repository}}:{{.Tag}}' | grep '^seventhltda/' | xargs -r docker rmi -f 2>/dev/null || true + + @echo "✅ Containers do profile 'app' removidos. Infraestrutura (dados) preservada." + + $(MAKE) app # =============================== # 💣 Limpeza TOTAL