31 lines
940 B
Makefile
31 lines
940 B
Makefile
|
DOCKER_COMPOSE=docker compose -f docker-compose-local.yml
|
||
|
|
||
|
.DEFAULT_GOAL := help
|
||
|
|
||
|
.PHONY: docker-up docker-start docker-down docker-ps docker-logs yarn-upgrade
|
||
|
|
||
|
help: ## show this help
|
||
|
@echo MAKE TARGETS
|
||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||
|
|
||
|
docker-up: ## bring docker compose stack up in background
|
||
|
$(DOCKER_COMPOSE) up -d
|
||
|
|
||
|
docker-down: ## take docker compose stack down
|
||
|
$(DOCKER_COMPOSE) down
|
||
|
|
||
|
docker-start: ## start docker compose stack in foreground and take it down after CTRL-C
|
||
|
$(DOCKER_COMPOSE) up; $(DOCKER_COMPOSE) down
|
||
|
|
||
|
docker-ps: ## show container state
|
||
|
$(DOCKER_COMPOSE) ps
|
||
|
|
||
|
docker-logs: ## show docker logs and follow
|
||
|
$(DOCKER_COMPOSE) logs -f || true
|
||
|
|
||
|
docker-%:
|
||
|
$(DOCKER_COMPOSE) $*
|
||
|
|
||
|
yarn-upgrade: # interactive yarn upgrade
|
||
|
$(DOCKER_COMPOSE) run --rm yarnstart yarn upgrade-interactive
|
||
|
$(DOCKER_COMPOSE) restart yarnstart
|