Skip to content

Commit 58d08ea

Browse files
authored
fix: WP-602 docker compose with and without dash (#301)
1 parent 5ae5632 commit 58d08ea

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

demdata_cms/Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ DOCKERHUB_REPO := $(shell cat ./docker_repo.var)
22
DOCKER_TAG ?= $(shell git rev-parse --short HEAD)
33
DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG)
44
DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest
5+
DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then echo "docker-compose"; else echo "docker compose"; fi)
56

67
# `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists
78
DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD)
89

910
#.PHONY: build
1011
build:
11-
docker-compose -f docker-compose.dev.yml build
12+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml build
1213

1314
.PHONY: build-full
1415
build-full:
@@ -27,12 +28,12 @@ publish-latest:
2728

2829
.PHONY: start
2930
start:
30-
docker-compose -f docker-compose.dev.yml up
31+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml up
3132

3233
.PHONY: stop
3334
stop:
34-
docker-compose -f docker-compose.dev.yml down
35+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down
3536

3637
.PHONY: stop-full
3738
stop-v:
38-
docker-compose -f docker-compose.dev.yml down -v
39+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down -v

ecep_cms/Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ DOCKERHUB_REPO := $(shell cat ./docker_repo.var)
22
DOCKER_TAG ?= $(shell git rev-parse --short HEAD)
33
DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG)
44
DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest
5+
DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then echo "docker-compose"; else echo "docker compose"; fi)
56

67
# `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists
78
DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD)
89

910
#.PHONY: build
1011
build:
11-
docker-compose -f docker-compose.dev.yml build
12+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml build
1213

1314
.PHONY: build-full
1415
build-full:
@@ -27,12 +28,12 @@ publish-latest:
2728

2829
.PHONY: start
2930
start:
30-
docker-compose -f docker-compose.dev.yml up
31+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml up
3132

3233
.PHONY: stop
3334
stop:
34-
docker-compose -f docker-compose.dev.yml down
35+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down
3536

3637
.PHONY: stop-full
3738
stop-v:
38-
docker-compose -f docker-compose.dev.yml down -v
39+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down -v

example_cms/Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ DOCKERHUB_REPO := $(shell cat ./docker_repo.var)
22
DOCKER_TAG ?= $(shell git rev-parse --short HEAD)
33
DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG)
44
DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest
5+
DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then echo "docker-compose"; else echo "docker compose"; fi)
56

67
# `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists
78
DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD)
89

910
#.PHONY: build
1011
build:
11-
docker-compose -f docker-compose.dev.yml build
12+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml build
1213

1314
.PHONY: build-full
1415
build-full:
@@ -27,12 +28,12 @@ publish-latest:
2728

2829
.PHONY: start
2930
start:
30-
docker-compose -f docker-compose.dev.yml up
31+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml up
3132

3233
.PHONY: stop
3334
stop:
34-
docker-compose -f docker-compose.dev.yml down
35+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down
3536

3637
.PHONY: stop-full
3738
stop-v:
38-
docker-compose -f docker-compose.dev.yml down -v
39+
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down -v

0 commit comments

Comments
 (0)