-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 1.09 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
#Makefile variables, make code simplier
COMPOSE_FILE ?= docker-compose.dev.yaml
DOCKER_COMPOSE ?= docker-compose -f ${COMPOSE_FILE}
DOCKER_EXEC ?= docker-compose exec -it
DOCKER_RUN ?= ${DOCKER_COMPOSE} run --rm --service-ports
# PHONY sets a virtual target when running Makefile commands, avoids targetting real files!
# -----------------------------------------------------------------------------------------------
install:
npm install
.PHONY: install
build:
${DOCKER_COMPOSE} build
.PHONY: build
# update dependencies
update:
npm install
.PHONY: update
# removes all containers associated with the api
down:
${DOCKER_COMPOSE} down
.PHONY: down
# starts the images which runs in the an isolated environment
up-all:
${DOCKER_COMPOSE} up -d
.PHONY: up-all
start:
npm run start
.PHONY: start
start-dev:
npm run start:dev
.PHONY: start-dev
test:
npm run test:watch
.PHONY: test
lint:
npm run lint
.PHONY: lint
exec:
${DOCKER_EXEC} api /bin/bash
.PHONY: exec
# Useful aliases
# -----------------------------------------------------------------------------------------------
dev: down up-all
.PHONY: dev