forked from PHPSP/phpsp.org.br
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (38 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
DOCKER_COMPOSE = docker-compose
DOCKER_COMPOSE_RUN = $(DOCKER_COMPOSE) run --rm web
COMPOSER = $(DOCKER_COMPOSE_RUN) composer
YARN = $(DOCKER_COMPOSE_RUN) yarn
##
## Basic
## -------
##
build:
@$(DOCKER_COMPOSE) pull --parallel --quiet --ignore-pull-failures 2> /dev/null
$(DOCKER_COMPOSE) build --pull
kill:
$(DOCKER_COMPOSE) kill
$(DOCKER_COMPOSE) down --volumes --remove-orphans
start: ## Start the project (assumes it's already installed)
$(DOCKER_COMPOSE) up -d --remove-orphans --no-recreate
stop: ## Stop the project (but won't destroy anything)
$(DOCKER_COMPOSE) stop
install: ## Install and start the project
install: build composer-install yarn-install start
reset: ## Destroys and installs a fresh version of the project
reset: kill install
.PHONY: install reset start stop
##
## Advanced
## -------
##
composer-install: ## Install PHP dependencies
$(COMPOSER) install
composer-update: ## Update PHP dependencies
$(COMPOSER) update
yarn-install: ## Install YARN dependencies
$(YARN) install
.PHONY: composer-install composer-update yarn-install
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help