forked from Roverr/rtsp-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (35 loc) · 1.36 KB
/
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
DOCKER_VERSION?=2
test: ## Runs tests
go test ./...
run: ## Builds & Runs the application
go build . && ./rtsp-stream
docker-build: ## Builds normal docker container
docker build -t roverr/rtsp-stream:${DOCKER_VERSION} .
docker-debug: ## Builds the image and starts it in debug mode
rm -rf ./log && mkdir log && \
$(MAKE) docker-build && \
docker run -d \
-v `pwd`/log:/var/log \
-e RTSP_STREAM_DEBUG=true \
-e RTSP_STREAM_AUTH_JWT_ENABLED=true \
-e RTSP_STREAM_AUTH_JWT_SECRET=your-256-bit-secret \
-e RTSP_STREAM_BLACKLIST_COUNT=2 \
-p 8080:8080 \
roverr/rtsp-stream:${DOCKER_VERSION}
docker-build-mg: ## Builds docker container with management UI
docker build -t roverr/rtsp-stream:${DOCKER_VERSION}-management -f Dockerfile.management .
docker-debug-mg: ## Builds management image and starts it in debug mode
rm -rf ./log && mkdir log && \
$(MAKE) docker-build-mg && \
docker run -d \
-v `pwd`/log:/var/log \
-e RTSP_STREAM_DEBUG=true \
-e RTSP_STREAM_BLACKLIST_COUNT=2 \
-p 3000:80 -p 8080:8080 \
roverr/rtsp-stream:${DOCKER_VERSION}-management
docker-all: ## Runs tests then builds all versions of docker images
$(MAKE) test && $(MAKE) docker-build && $(MAKE) docker-build-mg
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help