From f6a119b2cace60cde6cc128c845249649e15b9ba Mon Sep 17 00:00:00 2001 From: Sophia Massie Date: Fri, 6 Sep 2024 14:02:59 -0500 Subject: [PATCH] - Replaces my Makefile changes with those from main --- apcd-cms/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apcd-cms/Makefile b/apcd-cms/Makefile index d4899628..095a7d38 100644 --- a/apcd-cms/Makefile +++ b/apcd-cms/Makefile @@ -2,13 +2,14 @@ DOCKERHUB_REPO := $(shell cat ./docker_repo.var) DOCKER_TAG ?= $(shell git rev-parse --short HEAD) DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG) DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest +DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then echo "docker-compose"; else echo "docker compose"; fi) # `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD) #.PHONY: build build: - docker compose -f docker-compose.dev.yml build + $(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml build .PHONY: build-full build-full: @@ -27,12 +28,12 @@ publish-latest: .PHONY: start start: - docker compose -f docker-compose.dev.yml up + $(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml up .PHONY: stop stop: - docker compose -f docker-compose.dev.yml down + $(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down .PHONY: stop-full stop-v: - docker compose -f docker-compose.dev.yml down -v + $(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down -v