-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (37 loc) · 1.79 KB
/
Makefile
File metadata and controls
54 lines (37 loc) · 1.79 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ychaaibi <ychaaibi@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/16 11:02:56 by ychaaibi #+# #+# #
# Updated: 2023/11/16 12:37:19 by ychaaibi ### ########.fr #
# #
# **************************************************************************** #
IMAGES = wordpress:1337 nginx:1337 mariadb:1337 \
ftp:1337 redis:1337 adminer:1337 website:1337 cadvisor:1337
VOLUME_WORDPRESS = wordpress_vol
VOLUME_MARIADB = mariadb_vol
VOLUMES = $(VOLUME_MARIADB) $(VOLUME_WORDPRESS)
VOLUME_MARIADB_PATH = /home/ychaaibi/data/$(VOLUME_WORDPRESS)
VOLUME_WORDPRESS_PATH = /home/ychaaibi/data/$(VOLUME_MARIADB)
VOLUME_PATHS = $(VOLUME_MARIADB_PATH) $(VOLUME_WORDPRESS_PATH)
up : create_volumes
docker-compose -f ./src/docker-compose.yaml up &
down :
docker-compose -f ./src/docker-compose.yaml down
start :
docker-compose -f ./src/docker-compose.yaml start
stop :
docker-compose -f ./src/docker-compose.yaml stop
clean_volumes :
docker volume rm -f $(VOLUMES)
rm -rf $(VOLUME_PATHS)
create_volumes :
mkdir -p $(VOLUME_MARIADB_PATH)
mkdir -p $(VOLUME_WORDPRESS_PATH)
clean_images :
docker rmi -f $(IMAGES)
fclean : down clean_volumes clean_images
reset : fclean up