This repository has been archived by the owner on Aug 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.63 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
## Development only Makefile.
## Referenced and modified from mulitple sources (nanoninja,kreait)
## ---
## (c) 2017 .:hex ... ....- -..- --- .-. .. xǝɥ:.
include .env
include .mysql.env
.DEFAULT_GOAL := help
clean: ## make clean - Delete package directories and cache. Make install is required after.
@rm -vrf $(APP_DUMPDIR)/*
@rm -vrf vendor
@rm -vrf node_modules
@rm -v composer.lock
@rm -v yarn.lock
@rm -v *.log
@yarn cache clean
@composer -vvv clearcache
install: ## make install - Install Composer and NPM packages
@composer install
@yarn install
update: ## make update - Update Composer and NPM packages
@composer update
@yarn upgrade
mysqlenv: ## make mysqlenv - Set env vars
@docker-compose run -e MYSQL_DATABASE=$(MYSQL_DATABASE) mysql
@docker-compose run -e MYSQL_ROOT_PASSWORD=$(MYSQL_ROOT_PASSWORD) mysql
@docker-compose run -e MYSQL_USER=$(MYSQL_USER) mysql
@docker-compose run -e MYSQL_PASSWORD=$(MYSQL_PASSWORD) mysql
start: ## make start - Start containers compose and sync, watch, mount
@docker-sync-stack start
@yarn run dev &
@yarn run watch &
@docker volume create --name=app_sync &
@make mysqlenv
@docker-compose -f docker-compose-dev.yml -f docker-compose.yml up
stop: ## make stop - Kill containers, delete, and unmount volumes
@docker-sync-stack clean
test: ## make test - Run PHPUnit/XDebug in container
@docker-compose exec -T php ./$(APP_WORKDIR)/vendor/bin/phpunit --colors=always --configuration ./$(APP_WORKDIR)
help: ## make help - Display help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
.PHONY: clean