-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (45 loc) · 1 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
sail := ./vendor/bin/sail
.PHONY: rm
rm:
$(sail) down -v
.PHONY: docker-up
docker-up:
$(sail) up -d # get services running
sleep 10
.PHONY: backend-install
backend-install:
docker run --rm \
-u "$$(id -u):$$(id -g)" \
-v $$PWD:/var/www/html \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs
.PHONY: backend-setup
backend-setup:
$(sail) artisan key:generate # generate app key
.PHONY: backend-migrate
backend-migrate:
$(sail) artisan migrate --seed # db migration
.PHONY: frontend-clean
frontend-clean:
rm -rf node_modules 2>/dev/null || true
rm package-lock.json 2>/dev/null || true
rm yarn.lock 2>/dev/null || true
$(sail) yarn cache clean
.PHONY: frontend-install
frontend-install:
make frontend-clean
$(sail) yarn install
$(sail) npx mix
.PHONY: dev
dev:
make backend-install
make docker-up
make backend-setup
make backend-migrate
.PHONY: watch
watch:
$(sail) npx mix watch
.PHONY: down
down:
$(sail) down