-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 993 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
TRENDGENIE_OUTPUT_DIR ?= ~/trendgenie
TRENDGENIE_SERVICE_NAME ?= trendgenie
TEARDOWN_PREVIOUS_CONTAINER ?= true
.PHONY: build
build:
@echo "Building TrendGenie's Docker image..."
docker build -t $(TRENDGENIE_SERVICE_NAME) .
@echo "TrendGenie's Docker image built successfully"
.PHONY: run
run:
@echo "Running TrendGenie's Docker image..."
docker run -d --name $(TRENDGENIE_SERVICE_NAME) -p 7860:7860 -v $(TRENDGENIE_OUTPUT_DIR):/root/trendgenie $(TRENDGENIE_SERVICE_NAME)
@echo "TrendGenie is running on port 7860"
.PHONY: start
start:
make build
make run
.PHONY: stop
stop:
@echo "Stopping TrendGenie's Docker container..."
docker stop $(TRENDGENIE_SERVICE_NAME) || true
@echo "TrendGenie's Docker container stopped successfully"
.PHONY: rm
rm:
make stop
@echo "Removing TrendGenie's Docker container..."
docker rm $(TRENDGENIE_SERVICE_NAME) || true
@echo "TrendGenie's Docker container removed successfully"
.PHONY: logs
logs:
docker logs -f $(TRENDGENIE_SERVICE_NAME)