-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1.12: Keep the same syntax for all commands in the Makefile Add docker compose binary check in Makefile Add support for docker compose v2 [Composer] Bump up Sylius version [Maintenance] Run Sylius Plus info command post-create-project
- Loading branch information
Showing
2 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
.PHONY: run | ||
|
||
DOCKER_COMPOSE ?= docker compose | ||
DOCKER_USER ?= "$(shell id -u):$(shell id -g)" | ||
ENV ?= "dev" | ||
|
||
init: | ||
@make -s docker-compose-check | ||
@if [ ! -e compose.override.yml ]; then \ | ||
cp compose.override.dist.yml compose.override.yml; \ | ||
fi | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm php composer install --no-interaction --no-scripts | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm nodejs | ||
make install | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose up -d | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php composer install --no-interaction --no-scripts | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm nodejs | ||
@make -s install | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) up -d | ||
|
||
run: | ||
make up | ||
@make -s up | ||
|
||
debug: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose -f compose.yml -f compose.override.yml -f compose.debug.yml up -d | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) -f compose.yml -f compose.override.yml -f compose.debug.yml up -d | ||
|
||
up: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose up -d | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) up -d | ||
|
||
down: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose down | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) down | ||
|
||
install: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm php bin/console sylius:install -s default -n | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php bin/console sylius:install -s default -n | ||
|
||
clean: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose down -v | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) down -v | ||
|
||
php-shell: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose exec php sh | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) exec php sh | ||
|
||
node-shell: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm -i nodejs sh | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm -i nodejs sh | ||
|
||
node-watch: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm -i nodejs "npm run watch" | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm -i nodejs "npm run watch" | ||
|
||
docker-compose-check: | ||
@which $(DOCKER_COMPOSE) > /dev/null || (echo "Please install docker compose binary" && exit 1) | ||
@echo "You are using \"$(DOCKER_COMPOSE)\" binary" | ||
@echo "Current version is \"$$($(DOCKER_COMPOSE) version)\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters