summaryrefslogtreecommitdiff
path: root/Makefile
blob: e8d3207b772b77d04f388b93382619c77272670b (plain)
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
.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