forked from Groupe-maison-fr/Sylar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
105 lines (83 loc) · 2.34 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.DEFAULT_GOAL := help
###.silent := true
.PHONY: help
help:
@echo "Usage:"
@echo " make [command]"
@echo
@echo "Available commands:"
@grep -h '^[^#[:space:]].*:' Makefile | \
grep -v '^default' |\
grep -v '^\.' |\
grep -v '=' |\
grep -v '^_' |\
sed 's/://' |\
xargs -n 1 echo ' -' |\
sort
@echo
.PHONY: clean
clean:
- rm -r vendor/*
- rm -r public/build/*
$(MAKE) host-dev-destroy
.PHONY: host-dev-up
host-dev-up:
vagrant up --provision --parallel
#vagrant ssh sylar -c 'cd /opt/sylar;make docker-up'
.PHONY: host-dev-down
host-dev-down:
vagrant halt
.PHONY: host-dev-destroy
host-dev-destroy:
vagrant destroy -f
.PHONY: host-shell-runner
host-shell-runner:
vagrant ssh sylar -c 'cd /opt/sylar;docker-compose exec runner bash'
.PHONY: host-shell-builder
host-shell-builder:
vagrant ssh sylar -c 'cd /opt/sylar;docker-compose exec builder sh'
.PHONY: host-shell-monitor
host-shell-monitor:
vagrant ssh sylar -c 'cd /opt/sylar;docker-compose exec monitor sh'
.PHONY: host-tests
host-tests:
vagrant ssh sylar -- docker-compose -f /opt/sylar/docker-compose.yaml exec runner make test
.PHONY: host-shell-sylar
host-shell-sylar:
vagrant ssh sylar -c 'cd /opt/sylar;fish'
.PHONY: shell
shell:
$(MAKE) host-shell
.PHONY: host-vagrant-init-docker-compose
host-vagrant-init-docker-compose:
vagrant ssh sylar -- "docker-compose -f /opt/sylar/docker-compose.yaml up -d --build"
.PHONY: host-watch-assets
host-watch-assets:
vagrant ssh sylar -- docker-compose -f /opt/sylar/docker-compose.yaml exec builder yarn run watch
.PHONY: cs-fixer-fix
cs-fixer-fix:
vendor/bin/php-cs-fixer fix --verbose
.PHONY: docker-stats
docker-stats:
@docker stats --format "{{.ID}} {{.CPUPerc}} {{.MemUsage}} {{.Name}}"
.PHONY: test
test:
APP_ENV=test composer install --prefer-dist
vendor/bin/phpstan analyse src --level 5
vendor/bin/php-cs-fixer fix --verbose --dry-run
vendor/bin/phpunit --configuration phpunit.xml.dist tests --testdox
.PHONY: tests
tests:
docker-compose exec runner make test
.PHONY: docker-down
docker-down:
docker-compose down --remove-orphans
.PHONY: docker-up
docker-up:
docker-compose up --build -d
.PHONY: docker-logs
docker-logs:
docker-compose logs -f
.PHONY: host-restart-worker
host-restart-worker:
vagrant ssh sylar -c 'docker-compose -f /opt/sylar/docker-compose.yaml exec runner supervisorctl restart php-worker'