-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (34 loc) · 924 Bytes
/
Makefile
File metadata and controls
51 lines (34 loc) · 924 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
41
42
43
44
45
46
47
48
.DEFAULT_GOAL = all
WP_DATA = /home/ozasahin/data/wordpress
DB_DATA = /home/ozasahin/data/mariadb
DOCKER_COMPOSE = docker-compose -f srcs/docker-compose.yml
all: up
build:
$(DOCKER_COMPOSE) build
up: build
@mkdir -p $(WP_DATA)
@mkdir -p $(DB_DATA)
$(DOCKER_COMPOSE) up -d
down:
$(DOCKER_COMPOSE) down
start:
$(DOCKER_COMPOSE) start
stop:
$(DOCKER_COMPOSE) stop
logs:
$(DOCKER_COMPOSE) logs -f
restart:
$(DOCKER_COMPOSE) down
$(DOCKER_COMPOSE) up -d
clean: down
@docker stop $$(docker ps -aq) 2>/dev/null || true
@docker rm $$(docker ps -aq) 2>/dev/null || true
@docker rmi -f $$(docker images -q) 2>/dev/null || true
@rm -rf $(WP_DATA) $(DB_DATA) 2>/dev/null || true
prune: clean
@docker system prune -af --volumes
@docker volume rm mariadb_data wordpress_data 2>/dev/null || true
re: clean up
status:
$(DOCKER_COMPOSE) ps
.PHONY: all build up down start logs restart clean re prune status