-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
26 lines (20 loc) · 802 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
all:
@sudo hostsed add 127.0.0.1 prossi.42.fr && echo "successfully added prossi.42.fr to /etc/hosts"
sudo docker compose -f ./srcs/docker-compose.yml up -d
clean:
sudo docker compose -f ./srcs/docker-compose.yml down --rmi all -v
fclean: clean
@sudo hostsed rm 127.0.0.1 prossi.42.fr && echo "successfully removed prossi.42.fr to /etc/hosts"
@if [ -d "/home/prossi/data/wordpress" ]; then \
sudo rm -rf /home/prossi/data/wordpress/* && \
echo "successfully removed all contents from /home/prossi/data/wordpress/"; \
fi;
@if [ -d "/home/prossi/data/mariadb" ]; then \
sudo rm -rf /home/prossi/data/mariadb/* && \
echo "successfully removed all contents from /home/prossi/data/mariadb/"; \
fi;
re: fclean all
ls:
sudo docker image ls
sudo docker ps
.PHONY: all, clean, fclean, re, ls