-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 1.17 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
all: voldir
@docker-compose -f ./srcs/docker-compose.yml --env-file srcs/.env up -d
build: voldir
@docker-compose -f ./srcs/docker-compose.yml --env-file srcs/.env up --build -d
down:
@docker-compose -f ./srcs/docker-compose.yml --env-file srcs/.env down
nod: voldir
@docker-compose -f ./srcs/docker-compose.yml --env-file srcs/.env up
nod_build: voldir
@docker-compose -f ./srcs/docker-compose.yml --env-file srcs/.env --build up
voldir:
@mkdir -p ../data/mysql
@mkdir -p ../data/wordpress
re: down build
clean: down
-@docker stop $(docker ps -qa) 2>/dev/null; true;
-@docker rm $(docker ps -qa) 2>/dev/null; true;
-@docker rmi -f $(docker images -qa) 2>/dev/null; true;
-@docker volume rm $(docker volume ls -q) 2>/dev/null; true;
-@docker network rm $(docker network ls -q) 2>/dev/null; true;
@echo "stopped all containers & clean up images"
fclean: down clean
-@sudo rm -rf ../data/mysql && mkdir -p ../data/mysql; true;
-@sudo rm -rf ../data/wordpress && mkdir -p ../data/wordpress; true;
@echo "cleaned mysql and wordpress volumes"
sysclean: clean
-@docker system prune -a --volumes --force
@echo "completely cleaned up docker"
.PHONY : all build down re clean fclean