-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
39 lines (31 loc) · 1.24 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
# First target in the Makefile is the default.
all: help
SHELL := /bin/bash
# Get the location of this makefile.
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Get home directory of current users
HOMEDIR := $(shell eval printf "~$$USER")
CORE_DATADIR := ${HOMEDIR}/.chainpoint/core
UID := $(shell id -u $$USER)
GID := $(shell id -g $$USER)
LISTCONTAINERS := $(shell eval docker ps -a -q)
LISTVOLUMES := $(shell eval docker volume ls -q)
.PHONY : help
help : Makefile
@sed -n 's/^##//p' $<
## burn : Stop and remove all docker containers
.PHONY : burn
burn:
@docker stop ${LISTCONTAINERS} && sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm && docker container prune && docker volume rm ${LISTVOLUMES}
@echo ""
@echo "****************************************************************************"
@echo "Services stopped, and data pruned."
@echo "****************************************************************************"
## simnet : Spin up a simnet network
.PHONY : simnet
simnet:
@cd ./simnet && node start-simnet.js
## simnet-verbose : Spin up a simnet network with verbose logging of errors
.PHONY : simnet-verbose
simnet-verbose:
@cd ./simnet && node start-simnet.js --verbose