-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 815 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
40
41
42
.DEFAULT_GOAL := help
dc := docker compose
de := $(dc) exec
SHELL := /bin/bash
.PHONY: help
help: ## Display help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: dm
dm: ## Drop merged branches
git checkout master && git branch --merged | grep -v \* | xargs git branch -D
.PHONY: build-construct
build-construct: ## Builds the application
$(dc) up -d --build
.PHONY: up
up: ## Start application
$(dc) up -d
.PHONY: down
down: ## Stop application
$(dc) down
.PHONY: php
php: ## Go into php console
$(de) php /bin/bash
.PHONY: web
web: ## Go into web console
$(de) web /bin/bash
.PHONY: db
db: ## Go into db console
$(de) db /bin/bash
.PHONY: restart
restart: ## Restart application
$(dc) down; $(dc) up -d --build