-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.05 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
DOCKER=docker
COMPOSE=docker compose
UP=$(COMPOSE) -f compose.yaml up -d
EXEC=$(COMPOSE) exec
LOGS=$(COMPOSE) logs -f
# docker-compose
#===============================================================
all: up
build: ## docker build
$(BUILD)
up: ## docker up
$(UP)
logs: $(LOGS) ## docker logs
.PHONY: exec/server
exec/server: ## exec server container
$(EXEC) server bash
.PHONY: exec/client
exec/client: ## exec client container
$(EXEC) client bash
.PHONY: logs/server
logs/server: ## logs server container
$(LOGS) server
.PHONY: logs/client
logs/client: ## logs client container
$(LOGS) client
stop: ## docker stop
$(COMPOSE) stop
down: ## docker down
$(COMPOSE) down
down/all: ## delete images, network, containers
$(DOCKER) system prune --all
down/vol: ## delete volumes
$(DOCKER) volume prune
# Makefile config
#===============================================================
help: ## display this help screen
@grep -E '^[a-zA-Z/_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'