-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (29 loc) · 1.09 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
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
STACK=docker-compose.yml
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
# DOCKER TASKS
# Build the container
build: build_delivery_service build_consumer_service build_frontend_service
build_frontend_service: ### build frontend_service
$(MAKE) -C frontend_service -B build
build_delivery_service: ## build delivery_service
$(MAKE) -C delivery_service -B build
build_consumer_service: ## build consumer_service
$(MAKE) -C consumer_service -B build
push: ## Push all images
$(MAKE) -C frontend_service push
$(MAKE) -C delivery_service push
$(MAKE) -C consumer_service push
stack-deploy: ## Initialize the swarm
docker stack deploy -c $(STACK) delivery_app
stack-remove: ## Leave the swarm
docker stack rm delivery_app
lint: ## Lint all folders
$(MAKE) -C frontend_service lint
$(MAKE) -C delivery_service lint
$(MAKE) -C consumer_service lint