-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
84 lines (51 loc) · 2.66 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# ------------------------> Build main services <------------------------
inception : db wp adminer nginx
# ------------------------> Build main + additionnal services <------------------------
bonus : inception app ftp adminer redis dozzle
# ------------------------> Build and instantiate a single main service <------------------------
nginx :
sudo docker compose --file ./srcs/docker-compose.yml up --detach nginx
wp :
sudo docker compose --file ./srcs/docker-compose.yml up --detach wordpress
db :
sudo docker compose --file ./srcs/docker-compose.yml up --detach mariadb
# ------------------------> Build and instantiate a single additionnal service <------------------------
app :
sudo docker compose --file ./srcs/docker-compose.yml up --detach static-webpage
ftp :
sudo docker compose --file ./srcs/docker-compose.yml up --detach ftp-server
adminer :
sudo docker compose --file ./srcs/docker-compose.yml up --detach adminer
redis :
sudo docker compose --file ./srcs/docker-compose.yml up --detach redis-cache
dozzle :
sudo docker compose --file ./srcs/docker-compose.yml up --detach dozzle
# ------------------------> Redis-CLI monitoring <------------------------
redis-monitor :
sudo docker exec -it REDIS redis-cli monitor
# ------------------------> Show containers logs <------------------------
logs :
sudo docker compose --file ./srcs/docker-compose.yml logs
# ------------------------> List images, containers, volumes <------------------------
ls :
sudo docker image ls
sudo docker ps --all
sudo docker volume ls
# ------------------------> Stop containers <------------------------
stop :
sudo docker compose --file ./srcs/docker-compose.yml stop
# ------------------------> Stop and remove containers, network <------------------------
down :
sudo docker compose --file ./srcs/docker-compose.yml down
# ------------------------> Stop containers, removes images, networks, volumes <------------------------
rm :
sudo docker compose -f ./srcs/docker-compose.yml down --rmi all -v
# ------------------------> Remove unused <------------------------
prune :
sudo docker system prune --all --force
# ------------------------> Remove all <------------------------
clean : down prune rm
# ------------------------> Build - ReBuild <------------------------
all : inception
re : fclean all
.PHONY : clean fclean all re