-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.26 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
SHELL := /bin/bash # Use bash syntax
CURRENT_DIR := $(shell pwd)
RUNNING_NETWORK := $(shell sudo docker network ls -f name=lendit_gateway | grep lendit_gateway )
build:
sudo docker-compose -f docker-compose.dev.yml build
run:
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up; \
else \
sudo docker network create lendit_gateway; \
sudo docker-compose -f docker-compose.dev.yml up; \
fi
run-silent:
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up -d; \
else \
sudo docker network create lendit_gateway; \
sudo docker-compose -f docker-compose.dev.yml up -d; \
fi
run-build:
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up --build; \
else \
sudo docker network create lendit_gateway; \
sudo docker-compose -f docker-compose.dev.yml up --build; \
fi
down:
sudo docker-compose -f docker-compose.dev.yml down
lint:
sudo docker-compose -f docker-compose.dev.yml run user npm run lint
test:
sudo docker-compose -f docker-compose.dev.yml run user npm run test-ci
check-db:
sudo docker-compose -f docker-compose.dev.yml exec db_user psql -U postgres
cov:
sudo docker-compose -f docker-compose.dev.yml run user npm run cov