Skip to content

Commit

Permalink
Merge branch 'release/2.5.11' into craft-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed May 4, 2022
2 parents 14ff7d3 + 1e951a6 commit 2019f42
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nystudio107/craft Change Log

## 2.5.11 - 2022.05.03
### Added
* Determine the container name separator character by checking the Docker Compose API version at runtime

## 2.5.10 - 2022.05.02
### Changed
* Ignore `max-line-length` rule
Expand Down
23 changes: 15 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
CONTAINER?=$(shell basename $(CURDIR))-php-1
BUILDCHAIN?=$(shell basename $(CURDIR))-vite-1
# Determine the docker compose API version to get the separator character
VERSION?=$(shell docker-compose -v)
ifneq (,$(findstring v2.,$(VERSION)))
SEPARATOR:=-
else
SEPARATOR:=_
endif
CONTAINER?=$(shell basename $(CURDIR))$(SEPARATOR)php$(SEPARATOR)1
BUILDCHAIN?=$(shell basename $(CURDIR))$(SEPARATOR)vite$(SEPARATOR)1

.PHONY: build clean composer craft dev npm pulldb restoredb nuke ssh up

build: up
docker exec -it ${BUILDCHAIN} npm run build
docker exec -it $(BUILDCHAIN) npm run build
clean:
rm -f cms/composer.lock
rm -rf cms/vendor/
rm -f buildchain/package-lock.json
rm -rf buildchain/node_modules/
composer: up
docker exec -it ${CONTAINER} su-exec www-data composer \
docker exec -it $(CONTAINER) su-exec www-data composer \
$(filter-out $@,$(MAKECMDGOALS))
craft: up
docker exec -it ${CONTAINER} su-exec www-data php craft \
docker exec -it $(CONTAINER) su-exec www-data php craft \
$(filter-out $@,$(MAKECMDGOALS))
dev: up
npm: up
docker exec -it ${BUILDCHAIN} npm \
docker exec -it $(BUILDCHAIN) npm \
$(filter-out $@,$(MAKECMDGOALS))
pulldb: up
cd scripts/ && ./docker_pull_db.sh
Expand All @@ -29,9 +36,9 @@ nuke: clean
docker-compose down -v
docker-compose up --build --force-recreate
ssh:
docker exec -it ${CONTAINER} su-exec www-data /bin/sh
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; \
fi
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ We use `--no-install` so that the composer packages for the root project are not

You'll need [Docker desktop](https://www.docker.com/products/docker-desktop) for your platform installed to run devMode in local development

Ensure you're using the [Docker Compose API v2](https://stackoverflow.com/questions/69464001/docker-compose-container-name-use-dash-instead-of-underscore/70295720#70295720) for the `make` commands to all work properly.

Ensure no other local development environments are running that might have port conflicts, then:

* Start up the site by typing `make dev` in terminal in the project's root directory (the first build will be somewhat lengthy)
Expand Down

0 comments on commit 2019f42

Please sign in to comment.