-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
52 lines (37 loc) · 933 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
51
52
git-add:
git add .
git commit -am '${cmt}'
test:
echo ${cmt}
entermysql:
docker exec -it mysql_fiber_gorm_example mysql -u ADMIN -pSECRET rakamin_intern
entermysqlroot:
docker exec -it mysql_fiber_gorm_example mysql -u root -pSECRET_ROOT rakamin_intern
runenv:
docker compose up -d
run:
docker compose up -d
go run app/main.go
commit:
git add .
git commit -am '${cmt}'
struct:
gomodifytags -file ${file} -struct ${struct} -add-tags ${tags}
stop:
docker compose stop
down:
docker compose down -v
logs:
docker compose logs -f
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./dist/example ./app/main.go
dockerbuild:
docker build --rm -t example_fiber .
docker image prune --filter label=stage=dockerbuilder -f
dockerun:
docker run --name example_fiber -p 8080:8080 example_fiber
dockerrm:
docker rm example_fiber -f
docker rmi example_fiber
dockeenter:
docker exec -it example_fiber bash