-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 877 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 877 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
34
35
36
37
CONTAINER = ProxyDemo
.PHONY: build start stop restart logs test
build:
@echo "Building docker image(s)..."
docker-compose build --force-rm $(CONTAINER)
@echo "$(CONTAINER) build."
start: build
@echo "Starting docker-compose (up)..."
docker-compose up --remove-orphans -d $(CONTAINER)
@echo "$(CONTAINER) started."
stop:
@echo "Stopping docker-compose (down)..."
docker-compose down
@echo "$(CONTAINER) stopped."
restart:
@echo "Restarting docker-compose..."
docker-compose restart $(CONTAINER)
@echo "$(CONTAINER) restarted."
logs:
@echo "Displaying $(CONTAINER) logs..."
docker-compose logs --tail 0 -f $(CONTAINER)
test:
@echo "Installing Python requirements..."
python3 -m pip install -r requirements.txt >/dev/null
@echo "Starting $(CONTAINER) unittests..."
python3 -m unittest tests/test_*
@echo "$(CONTAINER) tests completed."
default: start