-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
53 lines (44 loc) · 1.67 KB
/
makefile
File metadata and controls
53 lines (44 loc) · 1.67 KB
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
# =============================================================================
# Color Variables
# =============================================================================
BLACK = "\033[0;30m"
GRAY = "\033[1;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
YELLOW = "\033[1;33m"
PURPLE = "\033[0;35m"
CYAN = "\033[0;36m"
WHITE = "\033[1;37m"
EOC = "\033[0;0m"
LINE_CLEAR = "\x1b[1A\x1b[M"
# =============================================================================
# File Variables
# =============================================================================
NAME = pong
# =============================================================================
# Target Generating
# =============================================================================
$(NAME) :
@echo $(YELLOW) "Composing docker system from docker-compose.yaml..." $(EOC)
@sh init.sh
@mkdir -p ./database ./backend/uploads ./uploads
@docker-compose up --build
# @echo $(GREEN) "Docker compose complete!" $(EOC)
# =============================================================================
# Rules
# =============================================================================
all : $(NAME)
backend :
@cd ./srcs ; docker-compose exec backend bash ; cd ..
frontend :
@cd ./srcs ; docker-compose exec frontend bash ; cd ..
postgres :
# @cd ./srcs ; docker-compose exec postgres bash ; cd ..
docker exec -it postgres psql -U postgres -d ft_db
fclean :
@echo $(YELLOW) "Removing All Docker things..." $(EOC)
@echo y | docker system prune -a
@docker volume prune
@echo $(RED) "All Docker things are removed! 🗑 🗑\n" $(EOC)
re : fclean all
.PHONY : all clean fclean re