-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
87 lines (75 loc) · 1.6 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
#!make
DOCKER_DIR=./docker
-include .env
export
DC=docker-compose
STAGE=local
all:
# Docker
build:
@$(DC) build --parallel
up:
@$(DC) up -d
down:
@$(DC) down
restart:
@$(DC) restart
reload:
@$(DC) down
@$(DC) up -d
ps:
@$(DC) ps
logs:
@$(DC) logs -t -f $(NAME)
exec:
@$(DC) exec $(NAME) bash
clean:
@docker image prune
@docker volume prune
drop:
@docker ps -aq | xargs docker rm
@docker images -aq | xargs docker rmi
# インストール設定
make_setting_file:
@cp .env-$(STAGE) .env
@cp docker-compose-$(STAGE).yml docker-compose.yml
install:
@make make_setting_file
@$(DC) up -d
@make composer C="install"
@make yarn
@make install_$(STAGE)
install_local:
@make artisan_ C="key:generate"
@make yarn_run_dev
@make composer C="db_r_s"
# 開発
# PHP
composer:
@$(DC) run --rm composer $(C)
artisan_:
@$(DC) run --rm artisan $(C)
# node
npm:
@$(DC) exec node npm $(C)
yarn:
@$(DC) exec node yarn $(C)
yarn_run_prod:
@$(DC) exec node yarn run prod
yarn_run_dev:
@$(DC) exec node yarn run dev
yarn_run_watch:
@$(DC) exec node yarn watch
yarn_run_watch_poll:
@$(DC) exec node yarn run watch-poll
##########################
### PHP test
##########################
test:
docker-compose run --rm php-cli ./vendor/bin/phpcbf --standard=/var/www/html/ruleset.xml
docker-compose run --rm php-cli ./vendor/bin/phpcs --standard=/var/www/html/ruleset.xml
docker-compose run --rm php-cli ./vendor/bin/phpunit
phpcs:
docker-compose run --rm php-cli ./vendor/bin/phpcs --standard=/var/www/html/ruleset.xml
phpcbf:
docker-compose run --rm php-cli ./vendor/bin/phpcbf --standard=/var/www/html/ruleset.xml