From 74e7bdae8c945881a28a3b194715fb15250f2f77 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Mon, 23 Aug 2021 20:40:13 -0400 Subject: [PATCH] Add a few targets to Makefile --- Makefile | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d2966fe9..ccb0f6be 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,37 @@ +BINARY=gatus + +install: + go build -mod vendor -o $(BINARY) . + +run: + GATUS_CONFIG_FILE=./config.yaml ./$(BINARY) + +clean: + rm $(BINARY) + +test: + sudo go test ./alerting/... ./client/... ./config/... ./controller/... ./core/... ./jsonpath/... ./pattern/... ./security/... ./storage/... ./util/... ./watchdog/... -cover + + +########## +# Docker # +########## + docker-build: docker build -t twinproduction/gatus:latest . -docker-build-and-run: - docker build -t twinproduction/gatus:latest . && docker run -p 8080:8080 --name gatus twinproduction/gatus:latest +docker-run: + docker run -p 8080:8080 --name gatus twinproduction/gatus:latest -build-frontend: +docker-build-and-run: docker-build docker-run + + +############# +# Front end # +############# + +frontend-build: npm --prefix web/app run build -run-frontend: +frontend-run: npm --prefix web/app run serve - -test: - go test ./alerting/... ./client/... ./config/... ./controller/... ./core/... ./jsonpath/... ./pattern/... ./security/... ./storage/... ./util/... ./watchdog/... -cover \ No newline at end of file