-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (39 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
#!make
MAKEFLAGS += --silent
include .env
export $(shell sed 's/=.*//' .env)
PROJECT="Trovobot.online Service"
all: install test server
install: ;@echo "Installing ${PROJECT}"; \
cd /server/; \
npm install
install-prod: ;@echo "Installing ${PROJECT}"; \
cd /server/; \
npm install --only=production
test: ;@echo "Testing ${PROJECT}"; \
cd /server/; \
npm run test
server: ;@echo "Starting ${PROJECT}"; \
cd /server/; \
npm run pm2
update: ;@echo "Updating ${PROJECT}"; \
git pull --rebase; \
cd /server/; \
clean; \
npm install
clean: ;@echo "Removing ${PROJECT}'s node_modules"; \
cd /server/; \
rm -rf node_modules
docker-run: ;@echo "Starting Docker for ${PROJECT}"; \
docker-compose -f docker-compose.yml up
docker-stop: ;@echo "Stopping Docker for ${PROJECT}"; \
docker-compose -f docker-compose.yml down
.PHONY: all
.PHONY: Install
.PHONY: install-prod
.PHONY: test
.PHONY: server
.PHONY: update
.PHONY: clean
.PHONY: docker-run
.PHONY: docker-stop