-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (45 loc) · 1.28 KB
/
Copy pathMakefile
File metadata and controls
64 lines (45 loc) · 1.28 KB
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
55
56
57
58
59
60
61
62
63
64
BINARY_NAME=microblocknet
GATEWAY_NAME=gateway
CLIENT_NAME=client
NODE_SERVICE_NAME=node
build-node:
@cd ./$(NODE_SERVICE_NAME); go build -o ./bin/$(BINARY_NAME) -v
gate-build:
@cd ./gateway; go build -o ./bin/$(GATEWAY_NAME) -v
gate: gate-build
@./gateway/bin/$(GATEWAY_NAME)
node: build-node
@DEBUG=true ./$(NODE_SERVICE_NAME)/bin/$(BINARY_NAME)
client-build:
@cd ./client; go build -o ./bin/$(CLIENT_NAME) -v
client: client-build
@./client/bin/$(CLIENT_NAME)
test:
@cd ./$(NODE_SERVICE_NAME); go test -v ./... -count=1
up-all:
@docker compose up
up:
@docker compose up gateway node1 node2 node3 node4
down:
@docker compose down
up-d:
@docker compose up -d
up-b:
@docker compose up --build
consul:
@docker compose up -d consul-server
@docker compose up -d consul-client
kafka:
@docker compose up -d kafka
mongo:
@docker compose up -d mongo
proto:
@protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
./common/proto/*.proto
build: proto
@docker build -t ghcr.io/yuriykis/microblocknet ./node
@docker build -t ghcr.io/yuriykis/microblocknet-gateway ./gateway
clear:
@docker images -f "dangling=true" -q | xargs -r docker rmi
.PHONY: build run test proto build-node gateway up down up-d up-b clear consul kafka mongo