You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
565 B
25 lines
565 B
.DEFAULT_GOAL := build
|
|
|
|
GOOS=linux
|
|
GOARCH=amd64
|
|
GOBIN=$(shell go env GOPATH)/bin
|
|
APP=authDBService
|
|
APP_BINARY=${GOBIN}/${APP}-${GOOS}-${GOARCH}
|
|
APP_TAG=slaventius/test3k_auth_db:latest
|
|
|
|
clean:
|
|
@echo "cleaning ${APP_BINARY}"
|
|
@go clean
|
|
@rm ${APP_BINARY}
|
|
|
|
build: clean
|
|
@echo "building ${APP_BINARY}"
|
|
@go build -o ${APP_BINARY} -ldflags "-s -w" ../cmd/main.go
|
|
|
|
docker-build:
|
|
@echo "building docker-image ${APP_TAG}"
|
|
@sudo docker build --no-cache --tag ${APP_TAG} .
|
|
|
|
docker-push: docker-build
|
|
@echo "pushing docker-image ${APP_TAG}"
|
|
@sudo docker push ${APP_TAG}
|