-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 810 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (25 loc) · 810 Bytes
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
DOCKER_COMPOSE_FILE = srcs/docker-compose.yml
DATABASE_VOLUME = /home/mvan-pee/data/mysql
WORDPRESS_VOLUME = /home/mvan-pee/data/wordpress
DATABASE_DOCKER_VOLUME = srcs_mariadb
WORDPRESS_DOCKER_VOLUME = srcs_wordpress
MKDIR = mkdir -p
RM = rm -rf
all: up
up:
sudo $(MKDIR) $(DATABASE_VOLUME)
sudo $(MKDIR) $(WORDPRESS_VOLUME)
docker-compose -f $(DOCKER_COMPOSE_FILE) up --build -d
down:
docker-compose -f $(DOCKER_COMPOSE_FILE) down
stop:
docker-compose -f $(DOCKER_COMPOSE_FILE) stop
clean: down
docker container prune --force
fclean: clean
sudo $(RM) $(DATABASE_VOLUME)
sudo $(RM) $(WORDPRESS_VOLUME)
docker system prune --all --force
docker volume rm $(DATABASE_DOCKER_VOLUME) $(WORDPRESS_DOCKER_VOLUME)
re: fclean all
.PHONY: all volume up down clean fclean re