add make to docker

This commit is contained in:
gipsh 2023-02-02 17:19:28 -03:00 committed by Gabriel Zimmermann
parent bb1fc8c3e2
commit a155e6c99f
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ WORKDIR /app
COPY . .
# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -o "./api" main.go
RUN make build
############################
# STEP 2 build a small image

View File

@ -26,7 +26,7 @@ help:
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
build:
go build -v $(LDFLAGS) -o api main.go
CGO_ENABLED=0 GOOS=linux go build -v $(LDFLAGS) -o api main.go
doc:
swag init -pd
@ -36,4 +36,4 @@ test:
go test -v -cover ./...
.PHONY: build doc test
.PHONY: build doc test

View File

@ -54,7 +54,7 @@ func (c *Controller) ReadyCheck(ctx *fiber.Ctx) error {
// VersionResponse is the JSON model for the 200 OK response in `GET /api/v1/version`.
type VersionResponse struct {
BuildDate string `json:"buildDate"`
BuildDate string `json:"build_date"`
Build string `json:"build"`
Branch string `json:"branch"`
Machine string `json:"machine"`