Skip to content

Commit

Permalink
- Replaces my Makefile changes with those from main
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-massie committed Sep 6, 2024
1 parent 9c6c88a commit f6a119b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apcd-cms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit f6a119b

Please sign in to comment.