-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
45 lines (32 loc) · 938 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
38
39
40
41
42
43
44
45
.PHONY: Makefile
.PHONY: bash
.PHONY: help
.PHONY: hooks
.PHONY: run
.PHONY: services
.PHONY: stop
# Trick to allow passing commands to make
# Use quotes (" ") if command contains flags (-h / --help)
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
# If command doesn't match, do not throw error
%:
@:
define helptext
Commands:
bash Open bash in backend container.
run Start docker containers for frontend development.
services Run required services in docker.
stop Stop running containers.
endef
export helptext
# Help should be first so that make without arguments is the same as help
help:
@echo "$$helptext"
bash:
@docker exec -it tvp-core bash
run:
@docker compose up --detach --build
services:
@docker compose up --detach --build db redis
stop:
@docker compose stop