-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (45 loc) · 2.06 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
47
48
49
50
51
52
53
54
55
56
57
58
59
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aandom <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/10/29 03:15:37 by aandom #+# #+# #
# Updated: 2023/10/29 03:15:37 by aandom ### ########.fr #
# #
# **************************************************************************** #
name = inception
all: build
build:
@printf "Building configuration ${name}...\n"
@bash ./srcs/requirements/wordpress/conf/createdir.sh
@docker compose -f ./srcs/docker-compose.yml up -d --build
start :
@printf "Starting existing containers of ${name}...\n"
@docker compose -f ./srcs/docker-compose.yml start
stop :
@printf "Stoping Running containers of ${name}...\n"
@docker compose -f ./srcs/docker-compose.yml stop
up:
@printf "restarting configuration ${name}...\n"
@docker compose -f ./srcs/docker-compose.yml up -d
down:
@printf "Stopping configuration ${name}...\n"
@docker compose -f ./srcs/docker-compose.yml down
re: fclean build
clean: down
@printf "Cleaning configuration ${name}...\n"
@docker system prune -a
@sudo rm -rf /home/${USER}/data
fclean:
@printf "Total clean of all configurations docker\n"
@sudo rm -rf /home/${USER}/data
@docker stop $$(docker ps -qa)
@docker system prune --all --force --volumes
@docker network prune --force
@docker volume prune --force
@docker volume rm $$(docker volume ls -q)
rm-volume:
@docker volume rm $$(docker volume ls -q)
.PHONY : all build down re clean fclean