-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
143 lines (143 loc) · 4.14 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
up:
docker compose up -d
build:
docker compose build --no-cache --force-rm
laravel-install:
docker compose exec app composer create-project --prefer-dist laravel/laravel .
create-project:
mkdir -p backend
@make build
@make up
@make laravel-install
docker compose exec app php artisan key:generate
docker compose exec app php artisan storage:link
docker compose exec app chmod -R 777 storage bootstrap/cache
@make fresh
install-recommend-packages:
# Laravel静的解析用
docker compose exec app composer require --dev nunomaduro/larastan:^2.0
# dbカラムの変更用
docker compose exec app composer require doctrine/dbal
# エディタのコード補完
docker compose exec app composer require --dev barryvdh/laravel-ide-helper
# bladeでのデバッグ向上
docker compose exec app composer require --dev barryvdh/laravel-debugbar
# 上記を動作させる用
docker compose exec app php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
# 上記を動作させる用
docker compose exec app composer require --dev roave/security-advisories:dev-master
# docker compose exec app composer require --dev beyondcode/laravel-dump-server
docker compose exec app php artisan vendor:publish --provider="BeyondCode\DumpServer\DumpServerServiceProvider"
init:
docker compose up -d --build
docker compose exec app composer install
docker compose exec app cp .env.example .env
docker compose exec app php artisan key:generate
docker compose exec app php artisan storage:link
docker compose exec app chmod -R 777 storage bootstrap/cache
@make fresh
remake:
@make destroy
@make init
stop:
docker compose stop
down:
docker compose down --remove-orphans
restart:
@make down
@make up
destroy:
docker compose down --rmi all --volumes --remove-orphans
destroy-volumes:
docker compose down --volumes --remove-orphans
ps:
docker compose ps
logs:
docker compose logs
logs-watch:
docker compose logs --follow
log-web:
docker compose logs web
log-web-watch:
docker compose logs --follow web
log-app:
docker compose logs app
log-app-watch:
docker compose logs --follow app
log-db:
docker compose logs db
log-db-watch:
docker compose logs --follow db
web:
docker compose exec web ash
app:
docker compose exec app bash
migrate:
docker compose exec app php artisan migrate
fresh:
docker compose exec app php artisan migrate:fresh --seed
seed:
docker compose exec app php artisan db:seed
dacapo:
docker compose exec app php artisan dacapo
rollback-test:
docker compose exec app php artisan migrate:fresh
docker compose exec app php artisan migrate:refresh
tinker:
docker compose exec app php artisan tinker
test:
docker compose exec app php artisan test
optimize:
docker compose exec app php artisan optimize
optimize-clear:
docker compose exec app php artisan optimize:clear
cache:
docker compose exec app composer dump-autoload -o
@make optimize
docker compose exec app php artisan event:cache
docker compose exec app php artisan view:cache
cache-clear:
docker compose exec app composer clear-cache
@make optimize-clear
docker compose exec app php artisan event:clear
npm:
@make npm-install
npm-install:
docker compose exec web npm install
npm-dev:
docker compose exec web npm run dev
npm-watch:
docker compose exec web npm run watch
npm-watch-poll:
docker compose exec web npm run watch-poll
npm-hot:
docker compose exec web npm run hot
yarn:
docker compose exec web yarn
yarn-install:
@make yarn
yarn-dev:
docker compose exec web yarn dev
yarn-watch:
docker compose exec web yarn watch
yarn-watch-poll:
docker compose exec web yarn watch-poll
yarn-hot:
docker compose exec web yarn hot
db:
docker compose exec db bash
sql:
docker compose exec db bash -c 'mysql -u $$MYSQL_USER -p$$MYSQL_PASSWORD $$MYSQL_DATABASE'
redis:
docker compose exec redis redis-cli
ide-helper:
docker compose exec app php artisan clear-compiled
docker compose exec app php artisan ide-helper:generate
docker compose exec app php artisan ide-helper:meta
docker compose exec app php artisan ide-helper:models --nowrite
stan:
docker compose exec app ./vendor/bin/phpstan analyse
barth:
docker-compose down --rmi all --volumes --remove-orphans
777:
sudo chmod 777 -R backend