-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (25 loc) · 811 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
DC ?= cd docker && docker-compose
.PHONY: help
help: ## This help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(TARGETS) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
-include docker/.env
docker/.env:
cp docker/.env.dist docker/.env
.PHONY: install
install: start ## Run docker instance and launch composer install
$(DC) exec www composer install
.PHONY: start
start: docker/.env ## Start docker
$(DC) up --build -d
.PHONY: stop
stop: ## Stop and destroy docker images
$(DC) down --remove-orphans
.PHONY: shell
shell: start ## Deploy to staging
$(DC) exec www zsh -c "export COLUMNS=`tput cols`; export LINES=`tput lines`; exec zsh"
.PHONY: docker-status
docker-status: ## Diplay containers status
$(DC) ps
.PHONY: cc
cc: ## Clear Symfony cache
rm -rf var/cache/*