-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 1.18 KB
/
Makefile
File metadata and controls
54 lines (42 loc) · 1.18 KB
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
54
dc-php=$$(echo "docker-compose exec php")
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: up
up: ## Bring up the containers
docker-compose up -d
.PHONY: down
down: ## Bring down the containers
docker-compose down
.PHONY: shell
shell: up ## Bring up the containers
$(dc-php) bash
.PHONY: stan
.SILENT: stan
stan: ## Run php stan in docker container
${dc-php} "vendor/bin/phpstan" "analyse"
.PHONY: test
.SILENT: test
test: ## Run php stan in docker container
${dc-php} "vendor/bin/phpunit"
.PHONY: setup
.SILENT: setup
setup: build .env composer ## Build everything to run this project
.PHONY: build
.SILENT: build
build: ## Build Dockerfile
docker-compose build
.env: ## Build .env
cp .env.example .env
.PHONY: composer
.SILENT: composer
composer: up ## run composer install
docker-compose run php composer install
.PHONY: npm
.SILENT: npm
npm: up ## run composer install
npm run && npm run dev
.PHONY: db
.SILENT: db
db: ## Create lokal db-struktur with seeder
${dc-php} "php" "artisan" "migrate:fresh" "--seed"