-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
56 lines (43 loc) · 1.37 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
53
54
55
56
UID ?= $(shell id -u)
GID ?= $(shell id -g)
help:
@echo "\e[32m Usage make [target] "
@echo
@echo "\e[1m targets:"
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'
clean: ## Clean everything
clean: clean-docker clean-logs clean-cache clean-dependencies
.PHONY: clean
clean-docker: ## Remove images, volumes, containers
# Not implemented
.PHONY: clean-docker
clean-logs: ## Clean all log files
# Not implemented
.PHONY: clean-logs
clean-cache: ## Clean local caches
# Not implemented
.PHONY: clean-cache
clean-dependencies: ## Clean dev dependencies
# Not implemented
.PHONY: clean-dependencies
build-php7: ## Build PHP7 container
# Hint: force a rebuild by passing --no-cache
@UID=$(UID) GID=$(GID) docker-compose build --no-cache php7
.PHONY: install-web
stop: ## Stop running containers
@UID=$(UID) GID=$(GID) docker-compose stop
.PHONY: stop
shell-php7: ## Start an interactive shell session for PHP7 container
# Hint: adjust UID and GID to 0 if you want to use the shell as root
@UID=$(UID) GID=$(GID) docker-compose run --rm -w /var/www/html -e SHELL_VERBOSITY=1 php7 bash
.PHONY: shell
test: ## Run all unit tests
test: php7-tests
.PHONY: test
test-php7: ## Run php unit tests
# Not implemented
.PHONY: php7-tests
watch-logs: ## Open a tail on all the logs
@UID=$(UID) GID=$(GID) docker-compose logs -f -t
.PHONY: watch-logs
.DEFAULT_GOAL := help