DOCKER_NODE := node:20-alpine
PROJECT_DIR = ./

.PHONY: tests
composer-update:
	docker run --rm -it --env COMPOSER_MEMORY_LIMIT=-1 --volume ${PWD}:/app prooph/composer:8.1 update --ignore-platform-reqs --no-scripts

composer-install:
	docker run --rm -it --env COMPOSER_MEMORY_LIMIT=-1 --volume ${PWD}:/app prooph/composer:8.1 install --ignore-platform-reqs --no-scripts

.PHONY: yarn-watch
yarn-install:
	yarn install

.PHONY: yarn-install
yarn-install: ## Install NPM dependencies
	docker run --rm -it --volume $(PROJECT_DIR):/app -w /app $(DOCKER_NODE) yarn install

.PHONY: yarn-build
yarn-build: ## Build frontend dependencies
	docker run --rm -it --volume $(PROJECT_DIR):/app -w /app $(DOCKER_NODE) yarn run build

.PHONY: yarn-build
yarn-watch: ## Build frontend dependencies in watch mode
	docker run --rm -it --volume $(PROJECT_DIR):/app -w /app $(DOCKER_NODE) yarn run watch
