-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 778 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (28 loc) · 778 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
34
35
36
37
38
39
40
SHELL:= /bin/bash
DOCKER_COMPOSE = docker-compose
DC_FILE = srcs/docker-compose.yml
all: up
up:
mkdir -p /home/gkrusta/data/mariadb
mkdir -p /home/gkrusta/data/wordpress
$(DOCKER_COMPOSE) -f $(DC_FILE) up -d --build
help:
@echo "make up start up the cluster"
@echo "make down shut down the cluster"
@echo "make clean to clean the docker system"
@echo "make fclean to delete the volume"
stop:
docker stop -t 0 $(shell docker ps -q)
down:
$(DOCKER_COMPOSE) -f $(DC_FILE) down
clean:
docker system prune -af
fclean: clean
docker volume rm $(shell docker volume ls -q)
re: fclean up
exec_nginx:
docker exec -it nginx-container /bin/bash
exec_wordpress:
docker exec -it wordpress-container /bin/bash
exec_mariadb:
docker exec -it mariadb-container /bin/bash