forked from aceberg/WatchYourLAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 749 Bytes
/
Makefile
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
39
40
41
42
DUSER=aceberg
DNAME=watchyourlan
IFACE=virbr-bw
DBPATH=data/hosts.db
SHOUTRRR_URL=gotify://192.168.2.1:8083/AwQqpAae.rrl5Ob/?title=Unknown host detected&DisableTLS=yes
THEME=darkly
mod:
cd src && \
rm go.mod && \
go mod init $(DNAME) && \
go mod tidy
run:
cd src && \
sudo \
env IFACE=$(IFACE) DBPATH=$(DBPATH) THEME=$(THEME) \
go run .
go-build:
cd src && \
go build .
docker-build:
docker build -t $(DUSER)/$(DNAME) .
docker-run:
docker rm wyl || true
docker run --name wyl \
-e "IFACE=$(IFACE)" \
-e "SHOUTRRR_URL=$(SHOUTRRR_URL)" \
-e "TZ=Asia/Novosibirsk" \
--network="host" \
-v ~/.dockerdata/wyl:/data \
$(DUSER)/$(DNAME)
clean:
rm src/$(DNAME) || true
docker rmi -f $(DUSER)/$(DNAME)
dev: docker-build docker-run