-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (35 loc) · 1.63 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: robin <robin@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/07/14 12:00:04 by mguerga #+# #+# #
# Updated: 2024/09/26 22:12:09 by mguerga ### ########.fr #
# #
# **************************************************************************** #
all: makedir up
makedir:
-@mkdir -p $(HOME)/data/db
build:
@docker-compose -f docker-compose.yaml build --progress=plain
up:
@docker-compose -f docker-compose.yaml up -d
down:
@docker-compose -f docker-compose.yaml down
clean:
-@docker stop $$(docker ps -qa) 2>/dev/null
-@docker rm $$(docker ps -qa) 2>/dev/null
-@docker rmi -f $$(docker images -qa) 2>/dev/null
-@docker volume rm $$(docker volume ls -q) 2>/dev/null
-@docker network rm $$(docker network ls -q) 2>/dev/null
fclean: clean
# On en veut pas du rm -rf @Robinounet le gros boulet signe BLERIM
ps:
@docker ps -a
log:
@make ps | docker-compose -f docker-compose.yaml logs
re: fclean all
rebuild: build up
.PHONY: all makedir build up down clean fclean ps log re rebuild