This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (45 loc) · 1.62 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
DOCKER_COMPOSE = docker-compose
#####
# Executed when you run "make" cmd
# Simply run "help" tasks
all: help
#####
# Start containers (Also builds images, if there not exists)
start:
$(DOCKER_COMPOSE) up -d
#####
# Stop containers (And also remove it)
stop:
$(DOCKER_COMPOSE) kill
$(DOCKER_COMPOSE) stop
$(DOCKER_COMPOSE) rm --force
#####
# List current running containers
list:
$(DOCKER_COMPOSE) ps
#####
# Start new bash terminal inside the wordpress Container
ssh:
$(DOCKER_COMPOSE) run wordpress bash
#####
# Display current running containers logs (Press "Ctrl + c" to exit)
logs:
$(DOCKER_COMPOSE) logs -f
#####
# Display available make commands
help:
@echo 'Recipes List:'
@echo ''
@echo 'use "make <recipes>"'
@echo 'ex "make list"'
@echo ''
@echo '+-----------------+--------------------------------------------------------------------+'
@echo '| Recipes | Utility |'
@echo '+-----------------+--------------------------------------------------------------------+'
@echo '| start | Start containers (Also builds images, if there not exists) |'
@echo '| stop | Stop containers (And also remove it) |'
@echo '| list | List current running containers |'
@echo '| ssh | Start new bash terminal inside the Wordpress Container |'
@echo '| logs | Display current running containers logs (Press "Ctrl + c" to exit) |'
@echo '+-----------------+--------------------------------------------------------------------+'
@echo ''