forked from 10acad/git-get-started-b4
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 965 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 965 Bytes
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
.PHONY: all init rebuild help up
DOCKER_EXEC=docker-compose -f docker-compose.yml
DOCKER_EXEC_PROD=docker-compose -f docker-compose.prod.yml
BIN_DIR=./bin
all: help
init: ## Initialize everything
$(DOCKER_EXEC) up -d --build
initprod: ## Initialize on prod
$(DOCKER_EXEC_PROD) up -d --build
deploy: ## deploy stuff
# push files in plugins folder
#rsync -chavzP -v --stats --include-from=rsync.list ./ 10academywordpress:/usr/app/
rsync ./*.yml 10academywordpress:/usr/app/
# restart docker on live
ssh 10academywordpress "cd /usr/app && make restartprod"
rebuild: ## Builds docker containers
$(DOCKER_EXEC) up -d --build
rebuildprod: ## Rebuild on prod
$(DOCKER_EXEC_PROD) up -d --build
restartprod: ## Restart on prod
$(DOCKER_EXEC_PROD) restart
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
up: ## Start docker containers
docker-compose up -d