diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 index 6c7d66eb..f213a8e1 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # nystudio107/devmode Change Log +## 2.6.6 - 2022.07.30 +### Added +* Added `docker compose` plugin support +* Suppressed .env copy operating from console output + ## 2.6.5 - 2022.05.04 ### Added * Determine the container name separator character by checking the Docker Compose API version at runtime diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 278ca85a..1b7595ee --- a/Makefile +++ b/Makefile @@ -1,10 +1,19 @@ # Determine the docker compose API version to get the separator character -VERSION?=$(shell docker-compose -v) -ifneq (,$(findstring v2.,$(VERSION))) - SEPARATOR:=- +SEPARATOR:=_ +DOCKER_COMPOSE_CMD=docker-compose +ifeq (, $(shell which docker-compose)) + ifneq (,$(findstring Docker Compose version,$(shell docker compose version))) + DOCKER_COMPOSE_CMD=docker compose + else + $(error "No docker compose plugin installed, install either docker-compose or docker-compose-plugin") + endif else - SEPARATOR:=_ + VERSION?=$(shell docker-compose -v) + ifneq (,$(findstring v2.,$(VERSION))) + SEPARATOR:=- + endif endif + CONTAINER?=$(shell basename $(CURDIR))$(SEPARATOR)php$(SEPARATOR)1 BUILDCHAIN?=$(shell basename $(CURDIR))$(SEPARATOR)vite$(SEPARATOR)1 @@ -40,15 +49,15 @@ restoredb: up $(filter-out $@,$(MAKECMDGOALS)) # Remove the Docker volumes & start clean nuke: clean - docker-compose down -v - docker-compose up --build --force-recreate + $(DOCKER_COMPOSE_CMD) down -v + $(DOCKER_COMPOSE_CMD) up --build --force-recreate # Open up a shell in the PHP container ssh: docker exec -it $(CONTAINER) su-exec www-data /bin/sh up: - if [ ! "$$(docker ps -q -f name=$(CONTAINER))" ]; then \ + @if [ ! "$$(docker ps -q -f name=$(CONTAINER))" ]; then \ cp -n cms/example.env cms/.env; \ - docker-compose up; \ + $(DOCKER_COMPOSE_CMD) up; \ fi %: @: