-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (74 loc) · 2.03 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
COREPATH ?= ./node_modules/brigadehub-core
PACKAGENAME ?= brigadehub
start:
node app.js
start/develop:
@echo make install
@$(MAKE) install
npm run nodemon -- app.js
start/develop/mongo:
@echo make install
@$(MAKE) install
mongod -d
npm run nodemon -- app.js
lint:
npm run standard
test:
@echo make lint
@$(MAKE) lint
@echo make test/unit
@$(MAKE) test/unit
@echo make test/e2e
@$(MAKE) test/e2e
test/unit:
echo 'no unit tests available.'
test/e2e:
# @echo make test/e2e/selenium/install
# @$(MAKE) test/e2e/selenium/install
# @echo make test/e2e/selenium/start
# @$(MAKE) test/e2e/selenium/start
echo 'no end-to-end tests available.'
test/e2e/selenium/install:
npm run selenium-standalone install
test/e2e/selenium/start:
npm run selenium-standalone start&
test/e2e/selenium/stop:
pkill -f selenium-standalone
db/clear:
$(COREPATH)/scripts/database-clear
db/seed:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
$(COREPATH)/scripts/database-seed
db/bootstrap:
$(COREPATH)/scripts/database-bootstrap
db/migrate/up:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
npm run db-migrate -- --config $(COREPATH)/config/database.json --migrations-dir $(COREPATH)/migrations up
db/migrate/down:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
npm run db-migrate -- --config $(COREPATH)/config/database.json --migrations-dir $(COREPATH)/migrations down
install:
npm install yarn
npm run yarn
@echo make db/migrate/up
@$(MAKE) db/migrate/up
install/clean:
rm -rf node_modules
@echo make install
@$(MAKE) install
build/docker:
docker build -t brigadehub/$(PACKAGENAME) .
build/docker/run:
docker run -d --name brigadehub -p 80:5465 -e MONGODB=mongodb://192.168.99.100:27017/brigadehub-docker brigadehub/$(PACKAGENAME)
build/docker/images:
docker images brigadehub/$(PACKAGENAME)
build/docker/tag:
echo "docker tag hash brigadehub/$(PACKAGENAME):release"
build/docker/push:
docker push brigadehub/$(PACKAGENAME)
build/docker/untag:
echo "docker rmi brigadehub/$(PACKAGENAME):release"
.PHONY: start lint test db install build