Skip to content

Commit

Permalink
fix: WP-602 docker compose with and without dash (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar authored Aug 7, 2024
1 parent 5ae5632 commit 58d08ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions demdata_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
9 changes: 5 additions & 4 deletions ecep_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
9 changes: 5 additions & 4 deletions example_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 58d08ea

Please sign in to comment.