summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..71d46fa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+.PHONY: all init deps install test lint run stop
+
+run:
+ go build
+ ./demoon 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 demoon:master .
+
+stop-container:
+ docker rm -f demoon 2>/dev/null && echo "old container removed"
+
+run-container: stop-container
+ docker run --name=demoon -v $(CURDIR)/store.json:/root/store.json -p 0.0.0.0:9000:9000 -d demoon:master