From eb730752940794af758c7219e0d76ddc5c334361 Mon Sep 17 00:00:00 2001 From: renator2 Date: Thu, 26 Mar 2026 05:13:23 -0300 Subject: [PATCH] #main - teste. --- Makefile | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 4b1934c..f2200b3 100644 --- a/Makefile +++ b/Makefile @@ -7,18 +7,6 @@ NETWORK_NAME = attendancesystem-network .PHONY: infra app install update reset-network nuke nuke-project -# =============================== -# ๐Ÿ— Subir apenas INFRA -# =============================== -infra: reset-network - @echo "๐Ÿš€ Subindo apenas INFRA ($(PROJECT_NAME))..." - docker compose \ - --project-name $(PROJECT_NAME) \ - --env-file $(ENV_FILE) \ - --profile infra \ - -f $(COMPOSE_FILE) \ - up -d - # =============================== # ๐Ÿงน Reset Network # =============================== @@ -26,22 +14,56 @@ reset-network: @echo "๐Ÿงน Removendo rede antiga (se existir)..." -docker network rm $(NETWORK_NAME) 2>/dev/null || true +# =============================== +# ๐Ÿ— Subir apenas INFRA +# =============================== +infra: reset-network + @echo "๐Ÿ“ฅ Baixando imagens de INFRA ($(PROJECT_NAME))..." + docker compose \ + --project-name $(PROJECT_NAME) \ + --env-file $(ENV_FILE) \ + --profile infra \ + -f $(COMPOSE_FILE) \ + pull --no-parallel + @echo "๐Ÿš€ Subindo apenas INFRA ($(PROJECT_NAME))..." + docker compose \ + --project-name $(PROJECT_NAME) \ + --env-file $(ENV_FILE) \ + --profile infra \ + -f $(COMPOSE_FILE) \ + up -d --pull never + # =============================== # ๐Ÿงฉ Subir apenas APP # =============================== app: + @echo "๐Ÿ“ฅ Baixando imagens de APP ($(PROJECT_NAME))..." + docker compose \ + --project-name $(PROJECT_NAME) \ + --env-file $(ENV_FILE) \ + --profile app \ + -f $(COMPOSE_FILE) \ + pull --no-parallel @echo "๐Ÿš€ Subindo apenas APP ($(PROJECT_NAME))..." docker compose \ --project-name $(PROJECT_NAME) \ --env-file $(ENV_FILE) \ --profile app \ -f $(COMPOSE_FILE) \ - up -d + up -d --pull never # =============================== # ๐Ÿ”ฅ Subir TUDO # =============================== install: + @echo "๐Ÿ“ฅ Baixando imagens ($(PROJECT_NAME))..." + docker compose \ + --project-name $(PROJECT_NAME) \ + --env-file $(ENV_FILE) \ + --profile infra \ + --profile app \ + -f $(COMPOSE_FILE) \ + pull --no-parallel @echo "๐Ÿš€ Subindo ambiente completo ($(PROJECT_NAME))..." docker compose \ --project-name $(PROJECT_NAME) \ @@ -49,7 +71,7 @@ install: --profile infra \ --profile app \ -f $(COMPOSE_FILE) \ - up -d + up -d --pull never # =============================== # ๐Ÿ”„ Atualizar projeto @@ -98,4 +120,4 @@ nuke-project: - docker images --format '{{.Repository}}:{{.Tag}}' | grep '^seventhltda/' | xargs -r docker rmi -f 2>/dev/null || true @echo "โœ… Projeto $(PROJECT_NAME) limpo (containers, volumes, rede e imagens)." - @echo " Imagens de infraestrutura preservadas." \ No newline at end of file + @echo " Imagens de infraestrutura preservadas."