-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (31 loc) · 717 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (31 loc) · 717 Bytes
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
include .env # Requires SLACK_CLIENT_ID and SLACK_CLIENT_SECRET
IMAGE := blaster:latest
export DEBUG ?= 1
export HOST ?= localhost
export PORT ?= 4000
export CERT_FILE ?= certs/localhost.crt
export KEY_FILE ?= certs/localhost.key
.PHONY: run
run:
go run main.go
.PHONY: test
test:
go test -v ./...
.PHONY: live
live:
air
.PHONY: docker-build
docker-build:
docker build -t $(IMAGE) .
.PHONY: docker-run
docker-run: docker-build
docker run --rm \
-e DEBUG=1 \
-e PORT=$(PORT) \
-e CERT_FILE="$(CERT_FILE)" \
-e KEY_FILE="$(KEY_FILE)" \
-e SLACK_CLIENT_ID="$(SLACK_CLIENT_ID)" \
-e SLACK_CLIENT_SECRET="$(SLACK_CLIENT_SECRET)" \
-p $(PORT):$(PORT) \
-v "$(PWD)/certs:/app/certs" \
$(IMAGE)