-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 899 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
all:
@sudo hostsed add 127.0.0.1 tblaase.42.fr && echo "successfully added tblaase.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
# uncomment the following line to remove the images too
# sudo docker system prune -a
fclean: clean
@sudo hostsed rm 127.0.0.1 tblaase.42.fr && echo "successfully removed tblaase.42.fr to /etc/hosts"
@if [ -d "/home/tblaase/data/wordpress" ]; then \
sudo rm -rf /home/tblaase/data/wordpress/* && \
echo "successfully removed all contents from /home/tblaase/data/wordpress/"; \
fi;
@if [ -d "/home/tblaase/data/mariadb" ]; then \
sudo rm -rf /home/tblaase/data/mariadb/* && \
echo "successfully removed all contents from /home/tblaase/data/mariadb/"; \
fi;
re: fclean all
ls:
sudo docker image ls
sudo docker ps
.PHONY: all, clean, fclean, re, ls