#main - teste.
This commit is contained in:
52
Makefile
52
Makefile
@@ -7,18 +7,6 @@ NETWORK_NAME = attendancesystem-network
|
|||||||
|
|
||||||
.PHONY: infra app install update reset-network nuke nuke-project
|
.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
|
# 🧹 Reset Network
|
||||||
# ===============================
|
# ===============================
|
||||||
@@ -26,22 +14,56 @@ reset-network:
|
|||||||
@echo "🧹 Removendo rede antiga (se existir)..."
|
@echo "🧹 Removendo rede antiga (se existir)..."
|
||||||
-docker network rm $(NETWORK_NAME) 2>/dev/null || true
|
-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
|
# 🧩 Subir apenas APP
|
||||||
# ===============================
|
# ===============================
|
||||||
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))..."
|
@echo "🚀 Subindo apenas APP ($(PROJECT_NAME))..."
|
||||||
docker compose \
|
docker compose \
|
||||||
--project-name $(PROJECT_NAME) \
|
--project-name $(PROJECT_NAME) \
|
||||||
--env-file $(ENV_FILE) \
|
--env-file $(ENV_FILE) \
|
||||||
--profile app \
|
--profile app \
|
||||||
-f $(COMPOSE_FILE) \
|
-f $(COMPOSE_FILE) \
|
||||||
up -d
|
up -d --pull never
|
||||||
|
|
||||||
# ===============================
|
# ===============================
|
||||||
# 🔥 Subir TUDO
|
# 🔥 Subir TUDO
|
||||||
# ===============================
|
# ===============================
|
||||||
install:
|
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))..."
|
@echo "🚀 Subindo ambiente completo ($(PROJECT_NAME))..."
|
||||||
docker compose \
|
docker compose \
|
||||||
--project-name $(PROJECT_NAME) \
|
--project-name $(PROJECT_NAME) \
|
||||||
@@ -49,7 +71,7 @@ install:
|
|||||||
--profile infra \
|
--profile infra \
|
||||||
--profile app \
|
--profile app \
|
||||||
-f $(COMPOSE_FILE) \
|
-f $(COMPOSE_FILE) \
|
||||||
up -d
|
up -d --pull never
|
||||||
|
|
||||||
# ===============================
|
# ===============================
|
||||||
# 🔄 Atualizar projeto
|
# 🔄 Atualizar projeto
|
||||||
@@ -98,4 +120,4 @@ nuke-project:
|
|||||||
- docker images --format '{{.Repository}}:{{.Tag}}' | grep '^seventhltda/' | xargs -r docker rmi -f 2>/dev/null || true
|
- 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 "✅ Projeto $(PROJECT_NAME) limpo (containers, volumes, rede e imagens)."
|
||||||
@echo " Imagens de infraestrutura preservadas."
|
@echo " Imagens de infraestrutura preservadas."
|
||||||
|
|||||||
Reference in New Issue
Block a user