-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
69 lines (61 loc) · 1.96 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
THIS_FILE := $(lastword $(MAKEFILE_LIST))
.PHONY: build rebuild rebuild-app up migrate migrate-rollback migrate-fresh migration route-list test composer-install composer-update composer-du npm-install npm-update npm-build npm-host demo-install update git-upstream publish
app := php-moonshine-demo
path := /var/www/moonshine-demo
app-npm := npm-moonshine-demo
#docker
build:
docker-compose -f docker-compose.yml up --build -d $(c)
rebuild:
docker-compose up -d --force-recreate --no-deps --build $(r)
rebuild-app:
docker-compose up -d --force-recreate --no-deps --build $(app)
up:
docker-compose -f docker-compose.yml up -d $(c)
it:
docker exec -it $(app) /bin/bash
#laravel
migrate:
docker exec $(app) php $(path)/artisan migrate
migrate-rollback:
docker exec $(app) php $(path)/artisan migrate:rollback
migrate-fresh:
docker exec $(app) php $(path)/artisan migrate:fresh --seed
migration:
docker exec $(app) php $(path)/artisan make:migration $(m)
route-list:
docker exec $(app) php $(path)/artisan route:list
test:
docker exec $(app) php $(path)/artisan test
#composer
composer-install:
docker exec $(app) composer install
composer-update:
docker exec $(app) composer update
composer-du:
docker exec $(app) composer du
#npm
npm-install:
docker-compose run --rm --service-ports $(app-npm) install $(c)
npm-update:
docker-compose run --rm --service-ports $(app-npm) update $(c)
npm-build:
docker-compose run --rm --service-ports $(app-npm) run dev $(c)
npm-host:
docker-compose run --rm --service-ports $(app-npm) run dev --host $(c)
#moonshine
demo-install:
cp .env.example .env
make build
make npm-install
make npm-build
make composer-install
docker exec $(app) php $(path)/artisan key:generate
docker exec $(app) php $(path)/artisan storage:link
make migrate-fresh
#for contributors
update: git-upstream publish
git-upstream:
git fetch upstream && git merge upstream/2.0
publish:
docker exec $(app) php $(path)/artisan vendor:publish --tag=laravel-assets --force $(c)