diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e8d3207 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +.PHONY: all init deps install test lint run stop + +run: + # templ generate + go build + ./secrethitler start + +init: + go mod init + +# install all dependencies used by the application +deps: + go clean -modcache + go mod download + +# install the application in the Go bin/ folder +install: + go install ./... + +test: + go test ./... + +lint: + golangci-lint run --config .golangci.yml + +gen: + go generate ./... + +build-container: + docker build -t secretH:master . + +stop-container: + docker rm -f secretH 2>/dev/null && echo "old container removed" + +run-container: stop-container + docker run --name=secretH -v $(CURDIR)/store.json:/root/store.json -p 0.0.0.0:8087:8087 -d secretH:master |