-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 879 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 879 Bytes
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
all : up
up : create-volumes
docker compose -f ./srcs/docker-compose.yml up -d --build
down :
docker compose -f ./srcs/docker-compose.yml down -v
re: fclean up
status :
@echo "\033[1;32mDOCKER:\033[0m"
@docker ps
@echo "\n\033[1;32mNETWORK:\033[0m"
@docker network ls
@echo "\n\033[1;32mIMAGES:\033[0m"
@docker images
clear :
@sudo rm -rf /home/$(shell whoami)/data/db
@sudo rm -rf /home/$(shell whoami)/data/wp
@docker system prune -af --volumes
@docker volume rm -f srcs_db || true
@docker volume rm -f srcs_wp || true
clean :
@docker ps -q | xargs -r docker stop
@docker ps -a -q | xargs -r docker rm
@docker images -q | xargs -r docker rmi
@docker network prune -f
fclean: clean clear
create-volumes:
@mkdir -p /home/$(shell whoami)/data/db
@mkdir -p /home/$(shell whoami)/data/wp
.PHONY: all clean fclean re status create-volumes generate-user