-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (31 loc) · 899 Bytes
/
Makefile
File metadata and controls
45 lines (31 loc) · 899 Bytes
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
project_name = boilerPlate
image_name = gofiber:latest
help:
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
run:
go run pkg/runnable.go
requirements:
go mod tidy
clean-packages:
go clean -modcache
up:
make up-silent
make shell
build:
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 3000:3000 --name $(project_name) $(image_name) ./app
up-silent-prefork:
make delete-container-if-exist
docker run -d -p 3000:3000 --name $(project_name) $(image_name) ./app -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)