-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
50 lines (37 loc) · 1.39 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
DOCKER_COMPOSE = docker-compose
##
## Project
## -------
##
build:
@$(DOCKER_COMPOSE) pull --parallel --quiet --ignore-pull-failures 2> /dev/null
$(DOCKER_COMPOSE) build --pull
kill:
$(DOCKER_COMPOSE) kill
$(DOCKER_COMPOSE) down --volumes --remove-orphans
install: ## Install and start the project
install: docker-compose.override.yml build start
reset: ## Stop and start a fresh install of the project
reset: kill install
start: ## Start the project
$(DOCKER_COMPOSE) up -d --remove-orphans --no-recreate
stop: ## Stop the project
$(DOCKER_COMPOSE) stop
clean: ## Stop the project and remove generated files
clean: kill
rm -rf docker-compose.override.yml
.PHONY: build kill install reset start stop clean
docker-compose.override.yml: docker-compose.override.yml.dist
@if [ -f docker-compose.override.yml ]; \
then\
echo '\033[1;41m/!\ The docker-compose.override.yml.dist file has changed. Please check your docker-compose.override.yml file (this message will not be displayed again).\033[0m';\
touch docker-compose.override.yml;\
exit 1;\
else\
echo cp docker-compose.override.yml.dist docker-compose.override.yml;\
cp docker-compose.override.yml.dist docker-compose.override.yml;\
fi
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help