-
-
Notifications
You must be signed in to change notification settings - Fork 367
/
Makefile
38 lines (26 loc) · 1.01 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
docker-app-exec = docker exec -it ghpvc-app /bin/sh -c
ssh-app: ## Connect to app container
docker exec -it ghpvc-app /bin/sh
setup-dev: ## Setup project for development
make start
make composer-install
start: ## Start application silently
docker-compose up -d
stop: ## Stop application
docker-compose down
restart: ## Restart the application
make stop
make start
composer-install: ## Install composer dependencies
$(docker-app-exec) 'composer install'
composer-update: ## Update composer dependencies
$(docker-app-exec) 'composer update $(filter-out $@,$(MAKECMDGOALS))'
copy-env: ## Copy .env.example as .env
cp .env.example .env
cleanup-docker: ## Remove old docker images
docker rmi $$(docker images --filter "dangling=true" -q --no-trunc)
run: ## Run command in the container
$(docker-app-exec) '$(filter-out $@,$(MAKECMDGOALS))'
help: # Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help