-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
23 lines (20 loc) · 620 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
.PHONY: build run
WORKDIR=$(CURDIR)
build:
go build -o build/VShareServer main.go
run: build
addr=0.0.0.0:8080 config=./build/config.json build/VShareServer
daemon: build
(pkill VShareServer || echo "skip kill" )&& nohup build/VShareServer \
--vfile=$(WORKDIR)/runtime/config.json \
--vindex=$(WORKDIR)/runtime/index.html \
&> ./build/vshare.log &
buildLinux:
GOOS=linux GOARCH=amd64 go build -o build/VShareServer main.go
docker-compose: buildLinux
docker-compose up --build --force-recreate
docker: buildLinux
docker run \
-p 8080:8080 \
-v /var/docker/public:/data/vmoon \
--rm -it `docker build -q .`