generated from openBackhaul/ApplicationOwnerRepositoryTemplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 845 Bytes
/
Makefile
File metadata and controls
36 lines (29 loc) · 845 Bytes
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
IMAGE = np-0.1
CONTAINER = NotificationProxy-0.1
SERVER_PORT = 9092
PORT = 3009
#DOCKER_HOST = linkvis-ci-01
# Build docker image
image:
npm install
docker build -t $(IMAGE) --label com.docker.compose.project="sdn" .
# Stop docker container
stop:
docker stop $(CONTAINER)
# Remove docker container
rm:
docker rm -f $(CONTAINER)
# Remove docker container and image
clean: rm
rm -f package-lock.json
rm -Rf node_modules
docker rmi $(IMAGE)
# Run docker container
run: rm
docker run -d -p $(PORT):$(SERVER_PORT) --restart always --name $(CONTAINER) $(IMAGE)
test: run
npm run test
newman run ../testing/NotificationProxy.postman_collection.json --env-var baseUrl=http://$(DOCKER_HOST):$(PORT)
test-local: run
npm run test
newman run ../testing/NotificationProxy.postman_collection.json --env-var baseUrl=http://localhost:$(PORT)