-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 866 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
# See `make help` for a list of all available commands.
# Configuration
PROJECT_NAME ?= auth-service
LOG_LEVEL = INFO
BUILD_TIMESTAMP := $(shell date +%Y-%m-%d-%H-%M-%S)
CI_COMMIT_SHORT_SHA := $(shell git rev-parse --short HEAD)
ENV_FILE ?= .env
.ONESHELL:
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
# include env file
#-include $(ENV_FILE)
.PHONY: up
up: build start
.PHONY: down
down: stop
.PHONY: build
build:
@echo "Building backend..."
@go build -o ./bin/authservice ./cmd/api/*
@echo "Back end built!"
.PHONY: start
start:
@echo "Starting backend..."
@ ./bin/authservice &
@echo "Back end started!"
.PHONY: stop
stop:
@echo "stopping backend ..."
@-pkill -SIGTERM -f "authservice"
@echo "stopped backend ..."
.PHONY: docker-build
docker-build:
@echo "building docker images from source code ..."
@docker build -t authservice .