-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1.23 KB
/
Makefile
File metadata and controls
40 lines (30 loc) · 1.23 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
test:
go test ./... -race -cover
bench:
go test ./... -bench=. -benchmem
build_web:
cd admin_ui; npm run build; cp -r dist/* ../cmd/server
build_linux_amd64:
cd admin_ui; npm run build; cp -r dist/* ../cmd/server
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/doq ./cmd/server
build_darwin_arm64:
cd admin_ui; npm run build; cp -r dist/* ../cmd/server
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o dist/doq ./cmd/server
build_dev:
cd admin_ui; npm run build; cp -r dist/* ../cmd/server
go build -o cmd/server/doq ./cmd/server
proto_compile:
protoc pkg/proto/*.proto \
--go_out=. \
--go-grpc_out=. \
--go_opt=paths=source_relative \
--go-grpc_opt=paths=source_relative \
--proto_path=.
run_web:
cd admin_ui; npm run dev
run_node_0:
cd cmd/server ; go run . --cluster.node_id node-0 --http.port 8000 --raft.address localhost:9000 --grpc.address localhost:10000
run_node_1:
cd cmd/server ; go run . --cluster.node_id node-1 --http.port 8001 --raft.address localhost:9001 --grpc.address localhost:10001 --cluster.join_addr localhost:8000
run_node_2:
cd cmd/server ; go run . --cluster.node_id node-2 --http.port 8002 --raft.address localhost:9002 --grpc.address localhost:10002 --cluster.join_addr localhost:8000