-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
43 lines (30 loc) · 1.29 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
# Check to see if we can use ash, in Alpine images, or default to BASH.
SHELL_PATH = /bin/ash
SHELL = $(if $(wildcard $(SHELL_PATH)),/bin/ash,/bin/bash)
run:
go run api/cmd/services/sales/main.go | go run api/cmd/tooling/logfmt/main.go
run-help:
go run api/cmd/services/sales/main.go --help | go run api/cmd/tooling/logfmt/main.go
run-build:
go run -ldflags "-X main.build=$(shell git rev-parse --short HEAD)" api/cmd/services/sales/main.go | go run api/cmd/tooling/logfmt/main.go
curl-test:
curl -i -X GET http://localhost:3000/test
# ==============================================================================
# Metrics and Tracing
metrics-view-sc:
expvarmon -ports="localhost:3010" -vars="build,requests,goroutines,errors,panics,mem:memstats.HeapAlloc,mem:memstats.HeapSys,mem:memstats.Sys"
statsviz:
open http://localhost:3010/debug/statsviz
# ==============================================================================
# Modules support
tidy:
go mod tidy
go mod vendor
# ==============================================================================
# Docker Compose
compose-up:
cd ./zarf/compose/ && docker compose -f docker_compose.yaml -p compose up -d
compose-down:
cd ./zarf/compose/ && docker compose -f docker_compose.yaml down
pgcli:
pgcli postgresql://postgres:postgres@localhost