Skip to content

Commit

Permalink
Merge pull request #165 from samuelveigarangel/update/makefile-comman…
Browse files Browse the repository at this point in the history
…d-update

Atualização do Makefile para otimização de atualização dos containers.
  • Loading branch information
robertatakenaka authored Sep 4, 2024
2 parents 9c67bd0 + 56a7394 commit d60ca9c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
MAKEFLAGS += --no-print-directory

# Variables
compose = docker-compose-dev.yml
REPO_SLUG = infrascielo
PROJECT_NAME = opac_5

Expand Down Expand Up @@ -263,12 +262,14 @@ 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" \
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 '*_prod'"; \
echo "No images found for 'infrascielo/opac_5'"; \
fi

update: stop rm exclude_opac_production up
# help: update - stop, remove old images, and start the containers
.PHONY: update
update: stop exclude_opac_production up

0 comments on commit d60ca9c

Please sign in to comment.