From 26671b4ee2a97a6116f2b1732810c650550b3d81 Mon Sep 17 00:00:00 2001 From: Samuel Veiga Rangel Date: Mon, 26 Aug 2024 11:01:19 -0300 Subject: [PATCH 1/3] Update makefile --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 125b331c..89d01bf1 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ MAKEFLAGS += --no-print-directory # Variables -compose = docker-compose-dev.yml REPO_SLUG = infrascielo PROJECT_NAME = opac_5 @@ -263,12 +262,12 @@ release_docker_push: ##image update## ################# -exclude_opac_production: ## Exclude all productions containers +exclude_opac_production: ## Exclude all production images @if [ -n "$$(docker images --filter=reference='infrascielo/opac_5' -q)" ]; then \ - docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q ); \ - echo "Exclude all opac production containers" \ + docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q); \ + echo "Excluded all 'infrascielo/opac_5' production images"; \ else \ - echo "No images found for '*_prod'"; \ + echo "No images found for 'infrascielo/opac_5'"; \ fi -update: stop rm exclude_opac_production up \ No newline at end of file +update: stop exclude_opac_production up \ No newline at end of file From cdb51daf69d6958c1377eb29627d67d5125e1277 Mon Sep 17 00:00:00 2001 From: Samuel Veiga Rangel Date: Mon, 26 Aug 2024 21:56:08 -0300 Subject: [PATCH 2/3] update exclude_opac_production --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 89d01bf1..a8593de7 100644 --- a/Makefile +++ b/Makefile @@ -264,8 +264,8 @@ release_docker_push: exclude_opac_production: ## Exclude all production images @if [ -n "$$(docker images --filter=reference='infrascielo/opac_5' -q)" ]; then \ + echo "Deleting containers $$(docker images --filter=reference='infrascielo/opac_5' -q --format '{{.Repository}}:{{.Tag}}')" \ docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q); \ - echo "Excluded all 'infrascielo/opac_5' production images"; \ else \ echo "No images found for 'infrascielo/opac_5'"; \ fi From 56a739482d9292acd48ea66f632fe787a30943ec Mon Sep 17 00:00:00 2001 From: Samuel Veiga Rangel Date: Mon, 2 Sep 2024 10:20:35 -0300 Subject: [PATCH 3/3] Fix comando update e adiciona help para update --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a8593de7..dd1daa12 100644 --- a/Makefile +++ b/Makefile @@ -264,10 +264,12 @@ release_docker_push: exclude_opac_production: ## Exclude all production images @if [ -n "$$(docker images --filter=reference='infrascielo/opac_5' -q)" ]; then \ - echo "Deleting containers $$(docker images --filter=reference='infrascielo/opac_5' -q --format '{{.Repository}}:{{.Tag}}')" \ + echo "Deleting containers $$(docker images --filter=reference='infrascielo/opac_5' -q --format '{{.Repository}}:{{.Tag}}')"; \ docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q); \ else \ echo "No images found for 'infrascielo/opac_5'"; \ fi +# help: update - stop, remove old images, and start the containers +.PHONY: update update: stop exclude_opac_production up \ No newline at end of file