-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 848 Bytes
/
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
NAME = inception
SRC = ./src
NGINX = nginx
all: $(NAME)
$(NAME): mkdir_data up
mkdir_data:
sudo mkdir -p $(HOME)/data
sudo mkdir -p $(HOME)/data/wordpress
sudo mkdir -p $(HOME)/data/database
sudo mkdir -p $(HOME)/data/prometheus
up:
cd $(SRC) && docker compose up
down: stop
cd $(SRC) && docker compose down
stop:
cd $(SRC) && docker compose stop
clean: down
-docker rmi -f $$(docker images "src*" | awk 'NR!=1 {print}' | awk '{print $$1}')
fclean: clean
-docker volume rm $$(docker volume ls --filter "Name = src*" | awk 'NR!=1 {print}' | awk '{print $$2}')
sudo rm -rf $(HOME)/data/wordpress
sudo rm -rf $(HOME)/data/database
sudo rm -rf $(HOME)/data/prometheus
re: fclean all
bonus: all
up-redis:
cd $(SRC) && docker compose up redis
.PHONY: mkdir_data up down stop clean fclean re