-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (48 loc) · 1.47 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
-include .env
THIS_FILE := $(lastword $(MAKEFILE_LIST))
app := $(COMPOSE_PROJECT_NAME)-php
app-npm := npm
path := $(APP_PATH)
.PHONY: install-local install-docker fork build up docker-up info stop it it-app it-nginx npm-install npm-update npm-build npm-host
install-local: fork
cd ./moonshine && \
composer install --dev && \
npm install && \
[ ! -f phpunit.xml.dist ] && cp phpunit-example.xml.dist phpunit.xml.dist && \
cd .. && \
[ ! -f .env ] && cp .env.example .env && \
composer update && \
php artisan migrate:fresh --seed
install-docker: fork build info
up: docker-up info
fork:
@read -p "Fork ([email protected]:moonshine-software/moonshine.git): " ARG; \
mkdir -p ./moonshine; \
git clone $$ARG ./moonshine;
#docker
build:
docker-compose -f docker-compose.yml up --build -d $(c)
@echo "See installation logs: docker logs -f $(app)"
docker-up:
docker-compose -f docker-compose.yml up -d $(c)
stop:
docker-compose -f docker-compose.yml stop $(c)
it:
docker exec -it $(to) /bin/bash
it-app:
docker exec -it $(app) /bin/bash
it-nginx:
docker exec -it $(nginx) /bin/bash
info:
@echo "$(APP_URL)/admin"
@echo "User: [email protected]"
@echo "Pass: 12345"
#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 build $(c)
npm-host:
docker-compose run --rm --service-ports $(app-npm) run dev --host $(c)