From d9e9a60d44913da4cdb6c0b3d676b522f7f6022c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 16 Jul 2021 12:09:40 +0100 Subject: [PATCH] Organise Makefile --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2d56cf2a..84f18e45 100644 --- a/Makefile +++ b/Makefile @@ -6,28 +6,30 @@ assets-watch: npm run watch build-images: - docker image build \ + docker image build . \ --file tools/docker/images/Dockerfile \ - --target=production \ - --tag $(DOCKER_IMAGE_NAME):latest \ --tag $(DOCKER_IMAGE_NAME):$(DOCKER_TAG) \ - . + --tag $(DOCKER_IMAGE_NAME):latest \ + --target=production deploy: cd tools/deployment && ansible-playbook deploy.yml +destroy: + COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down --volumes --remove-orphans + disable: COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down enable: - COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose up -d --build + COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose up --detach --build ps: COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose ps push-images: - docker image push $(DOCKER_IMAGE_NAME):latest docker image push $(DOCKER_IMAGE_NAME):$(DOCKER_TAG) + docker image push $(DOCKER_IMAGE_NAME):latest .PHONY: *