-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 800 Bytes
/
Makefile
File metadata and controls
33 lines (26 loc) · 800 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
.PHONY: test run-example run-example-dynamic client
test:
go test -race ./... -timeout 30s
run-example:
go run ./main.go -debug -config ./example/logserver.json
run-example-dynamic:
go run ./main.go -debug -dynamic -config ./example/logserver.json
build:
docker build . -t logserver
client: build
docker run --name logserver -d -v $(PWD)/logserver.json:/logserver.json -v $(PWD)/example:/example logserver
docker cp logserver:/client/dist ./client/
docker rm -f logserver
build-fast:
docker build ./ -f Dockerfile.fast -t logserver
run-nginx:
docker run \
--name nginx \
--rm \
-v $(PWD)/example/nginx:/web:ro \
-v $(PWD)/example/nginx/nginx.conf:/etc/nginx/nginx.conf:ro \
-p 8001:80 \
-p 8002:81 \
-u root \
--entrypoint nginx \
nginx:1.12-alpine -g 'daemon off;'