-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
64 lines (52 loc) · 1.71 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
CONFIG_DIRS := config
SRC := $(PWD)
VERSION := 0.2.7
.PHONY: all clean build frontend install prebuild docker production production-remove push run test
all: build
prebuild:
npm install -g nexe
frontend:
rm -rf www
if [ ! -d "dashboard" ]; then git clone https://github.com/orcinustools/dashboard.git;cd dashboard;npm install;npm run build:prod;cd $(SRC); else cd dashboard;npm install;npm run build:prod;cd $(SRC); fi
mv ./dashboard/dist www
rm -rf dashboard
build:
npm install
nexe
mkdir bin
mv orcinus bin/orcinus
install:
@echo "===> Install orcinus CLI"
@npm install -g
production: install
@echo "===> Install orcinus webserver"
@orcinus create -f ./deploy/webserver/orcinus.yml
@echo "===> Install orcinus database"
@orcinus create -f ./deploy/db/orcinus.yml
@echo "===> Install orcinus dashboard"
@orcinus create -f ./deploy/dashboard/orcinus.yml
@echo "===> Install orcinus repository"
@orcinus create -f ./deploy/repository/orcinus.yml
production-remove:
@echo "===> Remove orcinus webserver"
@orcinus rm -f ./deploy/webserver/orcinus.yml
@echo "===> Remove orcinus dashboard"
@orcinus rm -f ./deploy/dashboard/orcinus.yml
@echo "===> Remove orcinus repository"
@orcinus rm -f ./deploy/repository/orcinus.yml
@echo "===> Remove orcinus database"
@orcinus rm -f ./deploy/db/orcinus.yml
clean:
rm -rf build bin www coverage
docker:
docker build -t orcinus/orcinus:$(VERSION) .
docker tag orcinus/orcinus:$(VERSION) orcinus/orcinus:latest
push: docker
docker push orcinus/orcinus:$(VERSION)
docker push orcinus/orcinus:latest
run:
echo "Dashboard starting.........."
node cli.js dashboard
test:
npm install
npm run test