-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (35 loc) · 867 Bytes
/
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
44
45
46
47
48
49
50
project_name = pmgo
image_name = pmgo:pmgo
run-local:
go run app.go
requirements:
go mod tidy
clean-packages:
go clean -modcache
up:
make up-silent
make shell
build2:
docker build -t $(image_name) .
build-no-cache:
docker build --no-cache -t $(image_name) .
up-silent:
make delete-container-if-exist
docker run -d -p 9900:9900 --name $(project_name) $(image_name) ./gapi
up-silent-prefork:
make delete-container-if-exist
docker run -d -p 9900:9900 --name $(project_name) $(image_name) ./gapi -prod
delete-container-if-exist:
docker stop $(project_name) || true && docker rm $(project_name) || true
shell:
docker exec -it $(project_name) /bin/sh
stop:
docker stop $(project_name)
start:
docker start $(project_name)
run-local:
go run cmd/gapi
consul:
docker exec -it $(project_name) /go/src/pmgo/build/consul.sh
test:
go test -v ./...