-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (54 loc) · 1.88 KB
/
Makefile
File metadata and controls
75 lines (54 loc) · 1.88 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: cmarrued <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/02/14 18:35:59 by cmarrued #+# #+# #
# Updated: 2026/02/14 18:36:01 by cmarrued ### ########.fr #
# #
# **************************************************************************** #
NAME = inception
COMPOSE = docker compose -f srcs/docker-compose.yml --project-name $(NAME)
all: build up
build:
mkdir -p /home/cmarrued/data/wordpress
mkdir -p /home/cmarrued/data/mariadb
$(COMPOSE) build
rebuild:
mkdir -p /home/cmarrued/data/wordpress
mkdir -p /home/cmarrued/data/mariadb
$(COMPOSE) build --no-cache
up:
$(COMPOSE) up
down:
$(COMPOSE) down
downv:
$(COMPOSE) down -v
stop:
$(COMPOSE) stop
kill:
$(COMPOSE) kill
start:
$(COMPOSE) start
logs:
$(COMPOSE) logs -f
ps:
$(COMPOSE) ps
status:
@docker ps
clean: down
fclean: clean downv
re: clean build up
sprune: downv
@echo "This action will remove all Docker containers, images, volumes, and networks"
@read -p "Are you sure you want to continue? (y/N) " confirm; \
if [ "$$confirm" != "y" ]; then \
echo "Aborted."; \
exit 1; \
fi
docker system prune -a --volumes -f
sudo rm -rf /home/cmarrued/data/wordpress
sudo rm -rf /home/cmarrued/data/mariadb
.PHONY: all build rebuild down stop start logs status clean fclean re sprune