#SVTH-575 - Ajustes no repositório para instalação.
This commit is contained in:
17
Makefile
17
Makefile
@@ -4,6 +4,7 @@ ENV_FILE = .env.$(ENV)
|
|||||||
|
|
||||||
PROJECT_NAME = attendancesystem-$(ENV)
|
PROJECT_NAME = attendancesystem-$(ENV)
|
||||||
NETWORK_NAME = attendancesystem-network
|
NETWORK_NAME = attendancesystem-network
|
||||||
|
APP_SERVICES = suite-api users-api reports-api attendancesystem-api config-generator attendancesystem-app reports-app users-app suite-app
|
||||||
|
|
||||||
.PHONY: infra app install update restart reset-network nuke nuke-project
|
.PHONY: infra app install update restart reset-network nuke nuke-project
|
||||||
|
|
||||||
@@ -80,16 +81,26 @@ restart:
|
|||||||
docker restart $$(docker ps -q)
|
docker restart $$(docker ps -q)
|
||||||
|
|
||||||
# ===============================
|
# ===============================
|
||||||
# 🔄 Atualizar projeto
|
# 🔄 Atualizar projeto (apenas APP)
|
||||||
# ===============================
|
# ===============================
|
||||||
update:
|
update:
|
||||||
@echo "🛑 Parando e removendo containers do profile 'app' ($(PROJECT_NAME))..."
|
@echo "🛑 Parando containers do profile 'app' ($(PROJECT_NAME))..."
|
||||||
docker compose \
|
docker compose \
|
||||||
--project-name $(PROJECT_NAME) \
|
--project-name $(PROJECT_NAME) \
|
||||||
--env-file $(ENV_FILE) \
|
--env-file $(ENV_FILE) \
|
||||||
|
--profile infra \
|
||||||
--profile app \
|
--profile app \
|
||||||
-f $(COMPOSE_FILE) \
|
-f $(COMPOSE_FILE) \
|
||||||
down --remove-orphans
|
stop $(APP_SERVICES)
|
||||||
|
|
||||||
|
@echo "🗑️ Removendo containers do profile 'app' ($(PROJECT_NAME))..."
|
||||||
|
docker compose \
|
||||||
|
--project-name $(PROJECT_NAME) \
|
||||||
|
--env-file $(ENV_FILE) \
|
||||||
|
--profile infra \
|
||||||
|
--profile app \
|
||||||
|
-f $(COMPOSE_FILE) \
|
||||||
|
rm -f $(APP_SERVICES)
|
||||||
|
|
||||||
@echo "🖼️ Removendo imagens antigas do projeto (seventhltda)..."
|
@echo "🖼️ Removendo imagens antigas do projeto (seventhltda)..."
|
||||||
- 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
|
||||||
|
|||||||
Reference in New Issue
Block a user