-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.46 KB
/
Makefile
File metadata and controls
35 lines (29 loc) · 1.46 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aaslan <aaslan@student.42kocaeli.com.tr +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/02/13 09:17:04 by aaslan #+# #+# #
# Updated: 2024/02/13 10:35:28 by aaslan ### ########.fr #
# #
# **************************************************************************** #
all:
@if ! grep -q 'aaslan\.42\.fr' /etc/hosts; then \
sudo sed -i '1s/^/127.0.0.1\taaslan.42.fr\n/' /etc/hosts; \
fi
@mkdir -p /home/aaslan/data/wordpress
@mkdir -p /home/aaslan/data/mariadb
@docker-compose -f srcs/docker-compose.yml up --build
start:
@docker-compose -f srcs/docker-compose.yml start
stop:
@docker-compose -f srcs/docker-compose.yml stop
clean:
@docker-compose -f srcs/docker-compose.yml down --volumes
fclean: clean
@docker system prune -af
@sudo sed -i '/127.0.0.1\taaslan\.42\.fr/d' /etc/hosts
@rm -rf /home/aaslan/data
.PHONY: all start stop clean fclean re